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