[gs-cvs] rev 8254 - trunk/gs/src

ray at ghostscript.com ray at ghostscript.com
Thu Sep 27 13:20:47 PDT 2007


Author: ray
Date: 2007-09-27 13:20:46 -0700 (Thu, 27 Sep 2007)
New Revision: 8254

Modified:
   trunk/gs/src/gxclist.c
Log:
Prevent BandWidth from being set smaller than the page width. Fixes
crash reported in bug #688734.


Modified: trunk/gs/src/gxclist.c
===================================================================
--- trunk/gs/src/gxclist.c	2007-09-27 00:57:52 UTC (rev 8253)
+++ trunk/gs/src/gxclist.c	2007-09-27 20:20:46 UTC (rev 8254)
@@ -331,10 +331,9 @@
     gx_device_clist_writer * const cdev =
 	&((gx_device_clist *)dev)->writer;
     gx_device *target = cdev->target;
+    /* BandWidth can't be smaller than target device width */
     const int band_width =
-	cdev->page_info.band_params.BandWidth =
-	(cdev->band_params.BandWidth ? cdev->band_params.BandWidth :
-	 target->width);
+	cdev->page_info.band_params.BandWidth = max(target->width, cdev->band_params.BandWidth);
     int band_height = cdev->band_params.BandHeight;
     bool page_uses_transparency = cdev->page_uses_transparency;
     const uint band_space =



More information about the gs-cvs mailing list