]> granicus.if.org Git - imagemagick/commitdiff
...
authorCristy <urban-warrior@imagemagick.org>
Wed, 18 May 2016 11:17:34 +0000 (07:17 -0400)
committerCristy <urban-warrior@imagemagick.org>
Wed, 18 May 2016 11:17:34 +0000 (07:17 -0400)
MagickCore/draw.c

index d9fe9e7f2d9e397c05502cf5371234f3dfd86405..7d5b8216f2c80f729488fa44cd0d3c7ce80226d9 100644 (file)
@@ -490,10 +490,12 @@ static PolygonInfo *ConvertPathToPolygon(const PathInfo *path_info)
   if (polygon_info == (PolygonInfo *) NULL)
     return((PolygonInfo *) NULL);
   number_edges=16;
-  polygon_info->edges=(EdgeInfo *) AcquireQuantumMemory((size_t) number_edges,
+  polygon_info->edges=(EdgeInfo *) AcquireQuantumMemory(number_edges,
     sizeof(*polygon_info->edges));
   if (polygon_info->edges == (EdgeInfo *) NULL)
     return((PolygonInfo *) NULL);
+  (void) ResetMagickMemory(polygon_info->edges,0,number_edges*
+    sizeof(*polygon_info->edges));
   direction=0;
   edge=0;
   ghostline=MagickFalse;