Hello.

When start and end point in TraceArcPath are the same
the function just returns. This is an error because
it should set the primite_info->coordinates which
is used in the calling function. Sometimes
primite_info->coordinates is uninitialized and
the calling function breaks accessing unallocated
memory.

I fixed it so it adds a point to primitive_info.
Maybe it could set primite_info->coordinates to
0 but I am not sure it is valid.

Marko Mahnič


ImageMagick 6.3.0-6 Q8


--- draw.c.orig 2006-10-23 23:02:22.000000000 +0200
+++ draw.c      2006-11-30 16:02:18.718750000 +0100
@@ -4357,11 +4368,14 @@
 
   unsigned long
     arc_segments;
 
   if ((start.x == end.x) && (start.y == end.y))
+  {
+    TracePoint(primitive_info, end);
     return;
+  }
   radii.x=fabs(arc.x);
   radii.y=fabs(arc.y);
   if ((radii.x == 0.0) || (radii.y == 0.0))
     {
       TraceLine(primitive_info,start,end);
_______________________________________________
Magick-developers mailing list
Magick-developers@imagemagick.org
http://studio.imagemagick.org/mailman/listinfo/magick-developers

Reply via email to