CHANGES IN CUPS V2.0.2
+ - Security: cupsRasterReadPixels buffer overflow with invalid page
+ header and compressed raster data (STR #4551)
- Command-line programs were not localized on Mac OS X
(<rdar://problem/14546232>)
- The scheduler incorrectly cleared the MakeModel string in the
*
* Raster file routines for CUPS.
*
- * Copyright 2007-2014 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.
*/
if (!cups_raster_read_header(r))
+ {
+ memset(h, 0, sizeof(cups_page_header_t));
return (0);
+ }
/*
* Copy the header to the user-supplied buffer...
*/
if (!cups_raster_read_header(r))
+ {
+ memset(h, 0, sizeof(cups_page_header2_t));
return (0);
+ }
/*
* Copy the header to the user-supplied buffer...
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);
}