|
|
3151287 |
diff -up cups-1.7.5/filter/raster.c.str4551 cups-1.7.5/filter/raster.c
|
|
|
3151287 |
--- cups-1.7.5/filter/raster.c.str4551 2013-05-29 12:51:34.000000000 +0100
|
|
|
3151287 |
+++ cups-1.7.5/filter/raster.c 2015-02-16 15:43:14.790184784 +0000
|
|
|
3151287 |
@@ -3,7 +3,7 @@
|
|
|
3151287 |
*
|
|
|
3151287 |
* Raster file routines for CUPS.
|
|
|
3151287 |
*
|
|
|
3151287 |
- * Copyright 2007-2012 by Apple Inc.
|
|
|
3151287 |
+ * Copyright 2007-2015 by Apple Inc.
|
|
|
3151287 |
* Copyright 1997-2006 by Easy Software Products.
|
|
|
3151287 |
*
|
|
|
3151287 |
* This file is part of the CUPS Imaging library.
|
|
|
3151287 |
@@ -281,7 +281,10 @@ cupsRasterReadHeader(
|
|
|
3151287 |
*/
|
|
|
3151287 |
|
|
|
3151287 |
if (!cups_raster_read_header(r))
|
|
|
3151287 |
+ {
|
|
|
3151287 |
+ memset(h, 0, sizeof(cups_page_header_t));
|
|
|
3151287 |
return (0);
|
|
|
3151287 |
+ }
|
|
|
3151287 |
|
|
|
3151287 |
/*
|
|
|
3151287 |
* Copy the header to the user-supplied buffer...
|
|
|
3151287 |
@@ -310,7 +313,10 @@ cupsRasterReadHeader2(
|
|
|
3151287 |
*/
|
|
|
3151287 |
|
|
|
3151287 |
if (!cups_raster_read_header(r))
|
|
|
3151287 |
+ {
|
|
|
3151287 |
+ memset(h, 0, sizeof(cups_page_header2_t));
|
|
|
3151287 |
return (0);
|
|
|
3151287 |
+ }
|
|
|
3151287 |
|
|
|
3151287 |
/*
|
|
|
3151287 |
* Copy the header to the user-supplied buffer...
|
|
|
3151287 |
@@ -988,7 +994,7 @@ cups_raster_read_header(
|
|
|
3151287 |
|
|
|
3151287 |
cups_raster_update(r);
|
|
|
3151287 |
|
|
|
3151287 |
- return (r->header.cupsBytesPerLine != 0 && r->header.cupsHeight != 0);
|
|
|
3151287 |
+ return (r->header.cupsBytesPerLine != 0 && r->header.cupsHeight != 0 && (r->header.cupsBytesPerLine % r->bpp) == 0);
|
|
|
3151287 |
}
|
|
|
3151287 |
|
|
|
3151287 |
|