components/cups/patches/str4551.patch
author Sean Wilcox <sean.wilcox@oracle.com>
Tue, 08 Nov 2016 11:16:49 -0700
changeset 7262 19860fd7b64f
parent 5900 8693308c6031
permissions -rw-r--r--
24692363 restart of nova-compute went to maintenance
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
5900
8693308c6031 20648341 problem in UTILITY/CUPS
Panchami Sanjeev <panchami.sanjeev@oracle.com>
parents:
diff changeset
     1
/* This is an upstream patch. Details: https://www.cups.org/strfiles.php/3438/str4551.patch
8693308c6031 20648341 problem in UTILITY/CUPS
Panchami Sanjeev <panchami.sanjeev@oracle.com>
parents:
diff changeset
     2
Index: filter/raster.c
8693308c6031 20648341 problem in UTILITY/CUPS
Panchami Sanjeev <panchami.sanjeev@oracle.com>
parents:
diff changeset
     3
=================================================================== */
8693308c6031 20648341 problem in UTILITY/CUPS
Panchami Sanjeev <panchami.sanjeev@oracle.com>
parents:
diff changeset
     4
--- filter/raster.c	(revision 12451)
8693308c6031 20648341 problem in UTILITY/CUPS
Panchami Sanjeev <panchami.sanjeev@oracle.com>
parents:
diff changeset
     5
+++ filter/raster.c	(working copy)
8693308c6031 20648341 problem in UTILITY/CUPS
Panchami Sanjeev <panchami.sanjeev@oracle.com>
parents:
diff changeset
     6
@@ -3,7 +3,7 @@
8693308c6031 20648341 problem in UTILITY/CUPS
Panchami Sanjeev <panchami.sanjeev@oracle.com>
parents:
diff changeset
     7
  *
8693308c6031 20648341 problem in UTILITY/CUPS
Panchami Sanjeev <panchami.sanjeev@oracle.com>
parents:
diff changeset
     8
  *   Raster file routines for CUPS.
8693308c6031 20648341 problem in UTILITY/CUPS
Panchami Sanjeev <panchami.sanjeev@oracle.com>
parents:
diff changeset
     9
  *
8693308c6031 20648341 problem in UTILITY/CUPS
Panchami Sanjeev <panchami.sanjeev@oracle.com>
parents:
diff changeset
    10
- *   Copyright 2007-2010 by Apple Inc.
8693308c6031 20648341 problem in UTILITY/CUPS
Panchami Sanjeev <panchami.sanjeev@oracle.com>
parents:
diff changeset
    11
+ *   Copyright 2007-2015 by Apple Inc.
8693308c6031 20648341 problem in UTILITY/CUPS
Panchami Sanjeev <panchami.sanjeev@oracle.com>
parents:
diff changeset
    12
  *   Copyright 1997-2006 by Easy Software Products.
8693308c6031 20648341 problem in UTILITY/CUPS
Panchami Sanjeev <panchami.sanjeev@oracle.com>
parents:
diff changeset
    13
  *
8693308c6031 20648341 problem in UTILITY/CUPS
Panchami Sanjeev <panchami.sanjeev@oracle.com>
parents:
diff changeset
    14
  *   This file is part of the CUPS Imaging library.
8693308c6031 20648341 problem in UTILITY/CUPS
Panchami Sanjeev <panchami.sanjeev@oracle.com>
parents:
diff changeset
    15
@@ -239,7 +240,10 @@
8693308c6031 20648341 problem in UTILITY/CUPS
Panchami Sanjeev <panchami.sanjeev@oracle.com>
parents:
diff changeset
    16
   */
8693308c6031 20648341 problem in UTILITY/CUPS
Panchami Sanjeev <panchami.sanjeev@oracle.com>
parents:
diff changeset
    17
 
8693308c6031 20648341 problem in UTILITY/CUPS
Panchami Sanjeev <panchami.sanjeev@oracle.com>
parents:
diff changeset
    18
   if (!cups_raster_read_header(r))
8693308c6031 20648341 problem in UTILITY/CUPS
Panchami Sanjeev <panchami.sanjeev@oracle.com>
parents:
diff changeset
    19
+  {
8693308c6031 20648341 problem in UTILITY/CUPS
Panchami Sanjeev <panchami.sanjeev@oracle.com>
parents:
diff changeset
    20
+         memset(h, 0, sizeof(cups_page_header_t));
8693308c6031 20648341 problem in UTILITY/CUPS
Panchami Sanjeev <panchami.sanjeev@oracle.com>
parents:
diff changeset
    21
     return (0);
8693308c6031 20648341 problem in UTILITY/CUPS
Panchami Sanjeev <panchami.sanjeev@oracle.com>
parents:
diff changeset
    22
+  }
8693308c6031 20648341 problem in UTILITY/CUPS
Panchami Sanjeev <panchami.sanjeev@oracle.com>
parents:
diff changeset
    23
   
8693308c6031 20648341 problem in UTILITY/CUPS
Panchami Sanjeev <panchami.sanjeev@oracle.com>
parents:
diff changeset
    24
  /*
8693308c6031 20648341 problem in UTILITY/CUPS
Panchami Sanjeev <panchami.sanjeev@oracle.com>
parents:
diff changeset
    25
   * Copy the header to the user-supplied buffer...
8693308c6031 20648341 problem in UTILITY/CUPS
Panchami Sanjeev <panchami.sanjeev@oracle.com>
parents:
diff changeset
    26
@@ -268,7 +272,10 @@
8693308c6031 20648341 problem in UTILITY/CUPS
Panchami Sanjeev <panchami.sanjeev@oracle.com>
parents:
diff changeset
    27
   */
8693308c6031 20648341 problem in UTILITY/CUPS
Panchami Sanjeev <panchami.sanjeev@oracle.com>
parents:
diff changeset
    28
 
8693308c6031 20648341 problem in UTILITY/CUPS
Panchami Sanjeev <panchami.sanjeev@oracle.com>
parents:
diff changeset
    29
   if (!cups_raster_read_header(r))
8693308c6031 20648341 problem in UTILITY/CUPS
Panchami Sanjeev <panchami.sanjeev@oracle.com>
parents:
diff changeset
    30
+  {
8693308c6031 20648341 problem in UTILITY/CUPS
Panchami Sanjeev <panchami.sanjeev@oracle.com>
parents:
diff changeset
    31
+         memset(h, 0, sizeof(cups_page_header2_t));
8693308c6031 20648341 problem in UTILITY/CUPS
Panchami Sanjeev <panchami.sanjeev@oracle.com>
parents:
diff changeset
    32
     return (0);
8693308c6031 20648341 problem in UTILITY/CUPS
Panchami Sanjeev <panchami.sanjeev@oracle.com>
parents:
diff changeset
    33
+  }
8693308c6031 20648341 problem in UTILITY/CUPS
Panchami Sanjeev <panchami.sanjeev@oracle.com>
parents:
diff changeset
    34
   
8693308c6031 20648341 problem in UTILITY/CUPS
Panchami Sanjeev <panchami.sanjeev@oracle.com>
parents:
diff changeset
    35
  /*
8693308c6031 20648341 problem in UTILITY/CUPS
Panchami Sanjeev <panchami.sanjeev@oracle.com>
parents:
diff changeset
    36
   * Copy the header to the user-supplied buffer...
8693308c6031 20648341 problem in UTILITY/CUPS
Panchami Sanjeev <panchami.sanjeev@oracle.com>
parents:
diff changeset
    37
@@ -762,7 +762,7 @@
8693308c6031 20648341 problem in UTILITY/CUPS
Panchami Sanjeev <panchami.sanjeev@oracle.com>
parents:
diff changeset
    38
 
8693308c6031 20648341 problem in UTILITY/CUPS
Panchami Sanjeev <panchami.sanjeev@oracle.com>
parents:
diff changeset
    39
   cups_raster_update(r);
8693308c6031 20648341 problem in UTILITY/CUPS
Panchami Sanjeev <panchami.sanjeev@oracle.com>
parents:
diff changeset
    40
 
8693308c6031 20648341 problem in UTILITY/CUPS
Panchami Sanjeev <panchami.sanjeev@oracle.com>
parents:
diff changeset
    41
-  return (1);
8693308c6031 20648341 problem in UTILITY/CUPS
Panchami Sanjeev <panchami.sanjeev@oracle.com>
parents:
diff changeset
    42
+  return (r->header.cupsBytesPerLine != 0 && r->header.cupsHeight != 0 && (r->header.cupsBytesPerLine % r->bpp) == 0);
8693308c6031 20648341 problem in UTILITY/CUPS
Panchami Sanjeev <panchami.sanjeev@oracle.com>
parents:
diff changeset
    43
 }