LogoopenSUSE Build Service > Projects
Sign Up | Log In

View File cups-1.3.9-filter_png_overflow2.patch of Package cups (Project DISCONTINUED:openSUSE:11.1)

--- cups-1.3.9/filter/image-png.c.orig	2008-07-12 00:48:49.000000000 +0200
+++ cups-1.3.9/filter/image-png.c	2008-11-25 16:38:13.000000000 +0100
@@ -178,7 +178,7 @@ _cupsImageReadPNG(
     {
       bufsize = img->xsize * img->ysize;
 
-      if ((bufsize / img->ysize) != img->xsize)
+      if ((bufsize / img->xsize) != img->ysize)
       {
 	fprintf(stderr, "DEBUG: PNG image dimensions (%ux%u) too large!\n",
 		(unsigned)width, (unsigned)height);
@@ -190,7 +190,7 @@ _cupsImageReadPNG(
     {
       bufsize = img->xsize * img->ysize * 3;
 
-      if ((bufsize / (img->ysize * 3)) != img->xsize)
+      if ((bufsize / (img->xsize * 3)) != img->ysize)
       {
 	fprintf(stderr, "DEBUG: PNG image dimensions (%ux%u) too large!\n",
 		(unsigned)width, (unsigned)height);