[gs-cvs] rev 8288 - trunk/gs/src
ray at ghostscript.com
ray at ghostscript.com
Fri Oct 12 09:38:08 PDT 2007
Author: ray
Date: 2007-10-12 09:38:07 -0700 (Fri, 12 Oct 2007)
New Revision: 8288
Modified:
trunk/gs/src/gdevprn.c
Log:
Fix divide by zero crash. Bug 689493 reported by customer #190.
DETAILS:
When new_width is 0, just use 1 in the test (works well enough
for checking overflow)
EXPECTED DIFFERENCES:
None.
Modified: trunk/gs/src/gdevprn.c
===================================================================
--- trunk/gs/src/gdevprn.c 2007-10-11 16:36:26 UTC (rev 8287)
+++ trunk/gs/src/gdevprn.c 2007-10-12 16:38:07 UTC (rev 8288)
@@ -278,7 +278,7 @@
size_ok = ppdev->printer_procs.buf_procs.size_buf_device
(&buf_space, pdev, NULL, pdev->height, false) >= 0;
if (ppdev->page_uses_transparency)
- if (new_height < max_ulong/(ESTIMATED_PDF14_ROW_SPACE(new_width) >> 3))
+ if (new_height < max_ulong/(ESTIMATED_PDF14_ROW_SPACE(max(1, new_width)) >> 3))
pdf14_trans_buffer_size = new_height
* (ESTIMATED_PDF14_ROW_SPACE(new_width) >> 3);
else {
More information about the gs-cvs
mailing list