5898N/A/* This is an upstream patch. Details: https://www.cups.org/strfiles.php/3438/str4551.patch
5898N/AIndex: filter/raster.c
5898N/A=================================================================== */
5898N/A--- filter/raster.c (revision 12451)
5898N/A+++ filter/raster.c (working copy)
5898N/A@@ -3,7 +3,7 @@
5898N/A *
5898N/A * Raster file routines for CUPS.
5898N/A *
5898N/A- * Copyright 2007-2010 by Apple Inc.
5898N/A+ * Copyright 2007-2015 by Apple Inc.
5898N/A * Copyright 1997-2006 by Easy Software Products.
5898N/A *
5898N/A * This file is part of the CUPS Imaging library.
5898N/A@@ -239,7 +240,10 @@
5898N/A */
5898N/A
5898N/A if (!cups_raster_read_header(r))
5898N/A+ {
5898N/A+ memset(h, 0, sizeof(cups_page_header_t));
5898N/A return (0);
5898N/A+ }
5898N/A
5898N/A /*
5898N/A * Copy the header to the user-supplied buffer...
5898N/A@@ -268,7 +272,10 @@
5898N/A */
5898N/A
5898N/A if (!cups_raster_read_header(r))
5898N/A+ {
5898N/A+ memset(h, 0, sizeof(cups_page_header2_t));
5898N/A return (0);
5898N/A+ }
5898N/A
5898N/A /*
5898N/A * Copy the header to the user-supplied buffer...
5898N/A@@ -762,7 +762,7 @@
5898N/A
5898N/A cups_raster_update(r);
5898N/A
5898N/A- return (1);
5898N/A+ return (r->header.cupsBytesPerLine != 0 && r->header.cupsHeight != 0 && (r->header.cupsBytesPerLine % r->bpp) == 0);
5898N/A }