]> git.ipfire.org Git - thirdparty/cups.git/commitdiff
Fix another potential buffer overflow (STR #4599)
authormsweet <msweet@a1ca3aef-8c08-0410-bb20-df032aa958be>
Wed, 25 Mar 2015 18:44:16 +0000 (18:44 +0000)
committermsweet <msweet@a1ca3aef-8c08-0410-bb20-df032aa958be>
Wed, 25 Mar 2015 18:44:16 +0000 (18:44 +0000)
git-svn-id: svn+ssh://src.apple.com/svn/cups/cups.org/trunk@12570 a1ca3aef-8c08-0410-bb20-df032aa958be

CHANGES-2.0.txt
filter/raster.c

index de1a5a7e432446b1f75adaa889990b822d36cc09..73a7b9406aa95b2fc80e76d4526ea226a4314ba0 100644 (file)
@@ -5,7 +5,8 @@ CHANGES IN CUPS V2.0.3
 
        - Restored missing generic printer icon file (STR #4587)
        - Fixed logging of configuration errors to show up as errors (STR #4582)
-       - Fixed buffer overflow in rastertopwg (STR #4598)
+       - Fixed potential buffer overflows in raster code and filters
+         (STR #4598, STR #4599)
        - Added Russian translation (STR #4577)
 
 
index c3247da812a1575f7141c940393f9eb6d624835b..f455f475706b7c0d4a33af0ee7c8e309700387db 100644 (file)
@@ -1291,6 +1291,9 @@ cups_raster_write(
   */
 
   count = r->header.cupsBytesPerLine * 2;
+  if (count < 3)
+    count = 3;
+
   if ((size_t)count > r->bufsize)
   {
     if (r->buffer)