20648341 problem in UTILITY/CUPS
authorPanchami Sanjeev <panchami.sanjeev@oracle.com>
Mon, 02 May 2016 02:28:54 -0700
changeset 5900 8693308c6031
parent 5899 aa78da80bb9c
child 5901 cfee16e6e684
20648341 problem in UTILITY/CUPS
components/cups/patches/str4551.patch
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/components/cups/patches/str4551.patch	Mon May 02 02:28:54 2016 -0700
@@ -0,0 +1,43 @@
+/* This is an upstream patch. Details: https://www.cups.org/strfiles.php/3438/str4551.patch
+Index: filter/raster.c
+=================================================================== */
+--- filter/raster.c	(revision 12451)
++++ filter/raster.c	(working copy)
[email protected]@ -3,7 +3,7 @@
+  *
+  *   Raster file routines for CUPS.
+  *
+- *   Copyright 2007-2010 by Apple Inc.
++ *   Copyright 2007-2015 by Apple Inc.
+  *   Copyright 1997-2006 by Easy Software Products.
+  *
+  *   This file is part of the CUPS Imaging library.
[email protected]@ -239,7 +240,10 @@
+   */
+ 
+   if (!cups_raster_read_header(r))
++  {
++         memset(h, 0, sizeof(cups_page_header_t));
+     return (0);
++  }
+   
+  /*
+   * Copy the header to the user-supplied buffer...
[email protected]@ -268,7 +272,10 @@
+   */
+ 
+   if (!cups_raster_read_header(r))
++  {
++         memset(h, 0, sizeof(cups_page_header2_t));
+     return (0);
++  }
+   
+  /*
+   * Copy the header to the user-supplied buffer...
[email protected]@ -762,7 +762,7 @@
+ 
+   cups_raster_update(r);
+ 
+-  return (1);
++  return (r->header.cupsBytesPerLine != 0 && r->header.cupsHeight != 0 && (r->header.cupsBytesPerLine % r->bpp) == 0);
+ }