]> granicus.if.org Git - imagemagick/commitdiff
https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=6861
authorCristy <urban-warrior@imagemagick.org>
Wed, 14 Mar 2018 00:25:40 +0000 (20:25 -0400)
committerCristy <urban-warrior@imagemagick.org>
Wed, 14 Mar 2018 00:25:40 +0000 (20:25 -0400)
MagickCore/draw.c

index 165ff1c8e65b00561c16c9984b30cc4b091b105c..04fb4a76c8cc8bc19d534060f5bad50b6e5320d7 100644 (file)
@@ -1520,7 +1520,7 @@ static MagickBooleanType DrawDashPolygon(const DrawInfo *draw_info,
   for (i=0; primitive_info[i].primitive != UndefinedPrimitive; i++) ;
   number_vertices=(size_t) i;
   dash_polygon=(PrimitiveInfo *) AcquireQuantumMemory((size_t)
-    (2UL*(number_vertices+1UL)+1UL),sizeof(*dash_polygon));
+    (2UL*(number_vertices+2UL)+1UL),sizeof(*dash_polygon));
   if (dash_polygon == (PrimitiveInfo *) NULL)
     return(MagickFalse);
   clone_info=CloneDrawInfo((ImageInfo *) NULL,draw_info);