[gs-cvs] rev 8131 - trunk/gs/src
ray at ghostscript.com
ray at ghostscript.com
Mon Jul 16 10:39:10 PDT 2007
Author: ray
Date: 2007-07-16 10:39:09 -0700 (Mon, 16 Jul 2007)
New Revision: 8131
Modified:
trunk/gs/src/gximag3x.c
Log:
Prevent potential (although unlikely) divide by zero.
Modified: trunk/gs/src/gximag3x.c
===================================================================
--- trunk/gs/src/gximag3x.c 2007-07-16 17:25:30 UTC (rev 8130)
+++ trunk/gs/src/gximag3x.c 2007-07-16 17:39:09 UTC (rev 8131)
@@ -489,8 +489,9 @@
gx_device_memory *midev;
int code;
- if (height > max_ulong/width) /* protect against overflow in bitmap size */
- return_error(gs_error_VMerror);
+ if (width != 0)
+ if (height > max_ulong/width) /* protect against overflow in bitmap size */
+ return_error(gs_error_VMerror);
if (mdproto == 0)
return_error(gs_error_rangecheck);
midev = gs_alloc_struct(mem, gx_device_memory, &st_device_memory,
More information about the gs-cvs
mailing list