From 58c2e49720b68311b0adb3dcbd4f61c8d80123d9 Mon Sep 17 00:00:00 2001 From: Cristy Date: Wed, 16 May 2018 17:38:00 -0400 Subject: [PATCH] https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=8339 --- MagickCore/draw.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/MagickCore/draw.c b/MagickCore/draw.c index c6d73d97e..9a745290d 100644 --- a/MagickCore/draw.c +++ b/MagickCore/draw.c @@ -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) -- 2.40.0