From 3a555a4f30becb8db6651e6958ceb289f0611f79 Mon Sep 17 00:00:00 2001 From: msweet Date: Fri, 23 Oct 2015 20:30:33 +0000 Subject: [PATCH] Ensure that cupsBytesPerLine < 2^31 for 32-bit only platforms () git-svn-id: svn+ssh://src.apple.com/svn/cups/cups.org/trunk@12923 a1ca3aef-8c08-0410-bb20-df032aa958be --- CHANGES-2.1.txt | 3 ++- filter/raster.c | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/CHANGES-2.1.txt b/CHANGES-2.1.txt index dd85cf55bd..41de655a48 100644 --- a/CHANGES-2.1.txt +++ b/CHANGES-2.1.txt @@ -5,7 +5,8 @@ CHANGES IN CUPS V2.1.1 - Security hardening fixes (, , , - , ) + , , + ) - The cupsGetPPD* functions did not work with IPP printers (STR #4725) - Some older HP LaserJet printers need a delayed close when printing using the libusb-based USB backend (STR #4549) diff --git a/filter/raster.c b/filter/raster.c index 879012fd45..eff266e9b6 100644 --- a/filter/raster.c +++ b/filter/raster.c @@ -1022,7 +1022,7 @@ cups_raster_read_header( DEBUG_printf(("4cups_raster_read_header: cupsBitsPerPixel=%u, cupsBitsPerColor=%u, cupsBytesPerLine=%u, cupsWidth=%u, cupsHeight=%u, r->bpp=%d", r->header.cupsBitsPerPixel, r->header.cupsBitsPerColor, r->header.cupsBytesPerLine, r->header.cupsWidth, r->header.cupsHeight, r->bpp)); - return (r->header.cupsBitsPerPixel > 0 && r->header.cupsBitsPerPixel <= 240 && r->header.cupsBitsPerColor > 0 && r->header.cupsBitsPerColor <= 16 && r->header.cupsBytesPerLine != 0 && r->header.cupsHeight != 0 && (r->header.cupsBytesPerLine % r->bpp) == 0); + return (r->header.cupsBitsPerPixel > 0 && r->header.cupsBitsPerPixel <= 240 && r->header.cupsBitsPerColor > 0 && r->header.cupsBitsPerColor <= 16 && r->header.cupsBytesPerLine > 0 && r->header.cupsBytesPerLine <= 0x7fffffff && r->header.cupsHeight != 0 && (r->header.cupsBytesPerLine % r->bpp) == 0); } -- 2.47.2