Blob Blame History Raw
diff -up cups-1.6.3/filter/raster.c.str4551 cups-1.6.3/filter/raster.c
--- cups-1.6.3/filter/raster.c.str4551	2013-06-07 03:12:52.000000000 +0200
+++ cups-1.6.3/filter/raster.c	2015-06-10 11:58:55.393299339 +0200
@@ -281,7 +281,10 @@ cupsRasterReadHeader(
   */
 
   if (!cups_raster_read_header(r))
+  {
+    memset(h, 0, sizeof(cups_page_header_t));
     return (0);
+  }
 
  /*
   * Copy the header to the user-supplied buffer...
@@ -310,7 +313,10 @@ cupsRasterReadHeader2(
   */
 
   if (!cups_raster_read_header(r))
+  {
+    memset(h, 0, sizeof(cups_page_header2_t));
     return (0);
+  }
 
  /*
   * Copy the header to the user-supplied buffer...
@@ -988,7 +994,7 @@ cups_raster_read_header(
 
   cups_raster_update(r);
 
-  return (r->header.cupsBytesPerLine != 0 && r->header.cupsHeight != 0);
+  return (r->header.cupsBytesPerLine != 0 && r->header.cupsHeight != 0 && (r->header.cupsBytesPerLine % r->bpp) == 0);
 }