From 1cf81c1b71e2f40fd52cd76fb693add9b214310e Mon Sep 17 00:00:00 2001 From: Cristy Date: Fri, 23 Mar 2018 20:28:17 -0400 Subject: [PATCH] https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=7086 --- MagickCore/draw.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/MagickCore/draw.c b/MagickCore/draw.c index 34cbdf6e5..2e1d11e0f 100644 --- a/MagickCore/draw.c +++ b/MagickCore/draw.c @@ -1441,7 +1441,8 @@ MagickExport MagickBooleanType DrawClipPath(Image *image, (void) CloneString(&clone_info->primitive,value); (void) QueryColorCompliance("#ffffff",AllCompliance,&clone_info->fill, exception); - clone_info->clip_mask=(char *) NULL; + if (clone_info->clip_mask != (char *) NULL) + clone_info->clip_mask=DestroyString(clone_info->clip_mask); status=DrawImage(clip_mask,clone_info,exception); (void) SetImageMask(image,WritePixelMask,clip_mask,exception); clip_mask=DestroyImage(clip_mask); -- 2.40.0