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

leonardo at ghostscript.com leonardo at ghostscript.com
Tue Sep 11 12:29:18 PDT 2007


Author: leonardo
Date: 2007-09-11 12:29:17 -0700 (Tue, 11 Sep 2007)
New Revision: 8236

Modified:
   trunk/gs/src/gxpcopy.c
Log:
Fix (filling algorithm) : Split big segments before filling a path.

DETAILS :

Bug 689397 "Infinite loop is PS ATS file tp pcxcmyk device."

The old code didn't split big segments due to an inaccurate coding.
It caused a fixed overflow with in a coordinate compitation
and a loop of about 2^30 steps.

EXPECTED DIFFERENCES :

None.


Modified: trunk/gs/src/gxpcopy.c
===================================================================
--- trunk/gs/src/gxpcopy.c	2007-09-10 08:31:42 UTC (rev 8235)
+++ trunk/gs/src/gxpcopy.c	2007-09-11 19:29:17 UTC (rev 8236)
@@ -341,7 +341,7 @@
 	    case s_line:
 		if (gx_check_fixed_diff_overflow(pseg->pt.x, pt0.x) ||
 		    gx_check_fixed_diff_overflow(pseg->pt.y, pt0.y))
-		    return true;
+		    return false;
 		break;
 	    case s_curve:
 		{
@@ -367,6 +367,9 @@
 				pt0.y, pc->p1.y, pc->p2.y, pc->pt.y,
 				&ax, &bx, &cx, &ay, &by, &cy, k))
 			    return false;
+		    if (gx_check_fixed_diff_overflow(pseg->pt.x, pt0.x) ||
+			gx_check_fixed_diff_overflow(pseg->pt.y, pt0.y))
+			return false;
 		    }
 		}
 		break;



More information about the gs-cvs mailing list