[gs-cvs] rev 8670 - trunk/gs/src
alexcher at ghostscript.com
alexcher at ghostscript.com
Mon Apr 28 10:48:27 PDT 2008
Author: alexcher
Date: 2008-04-28 10:48:26 -0700 (Mon, 28 Apr 2008)
New Revision: 8670
Modified:
trunk/gs/src/gdevddrw.c
Log:
Refine calculation of di member of a trap_line structure to avoid integer
overflow when the source operands are big. Bug 689448.
DIFFERENCES:
None
Modified: trunk/gs/src/gdevddrw.c
===================================================================
--- trunk/gs/src/gdevddrw.c 2008-04-28 16:26:35 UTC (rev 8669)
+++ trunk/gs/src/gdevddrw.c 2008-04-28 17:48:26 UTC (rev 8670)
@@ -126,7 +126,7 @@
if ((tl->df = xd + h) >= 0 /* xd >= -h */)
tl->di = -1, tl->x -= ys;
else {
- tl->di = di = (int)-((h - 1 - xd) / h);
+ tl->di = di = (int)((xd + 1) / h - 1);
tl->df = xd - di * h;
tl->x += ys * di;
}
More information about the gs-cvs
mailing list