]> granicus.if.org Git - imagemagick/commitdiff
https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=8339
authorCristy <urban-warrior@imagemagick.org>
Wed, 16 May 2018 21:38:00 +0000 (17:38 -0400)
committerCristy <urban-warrior@imagemagick.org>
Wed, 16 May 2018 21:38:00 +0000 (17:38 -0400)
MagickCore/draw.c

index c6d73d97e019969239f6d1e484749af9073ebd51..9a745290d4521eef602831174e40b0757e6ef2b8 100644 (file)
@@ -3105,7 +3105,11 @@ MagickExport MagickBooleanType DrawImage(Image *image,const DrawInfo *draw_info,
                 GetNextToken(q,&q,extent,token);
                 (void) FormatLocaleString(name,MaxTextExtent,"%s",token);
                 clip_path=GetNodeByURL(primitive,name);
-                (void) SetImageArtifact(image,name,clip_path);
+                if (clip_path != (char *) NULL)
+                  {
+                    (void) SetImageArtifact(image,name,clip_path);
+                    clip_path=DestroyString(clip_path);
+                  }
                 break;
               }
             if (LocaleCompare("defs",token) == 0)