From: Cristy Date: Sat, 24 Mar 2018 00:28:17 +0000 (-0400) Subject: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=7086 X-Git-Tag: 7.0.7-28~39 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=1cf81c1b71e2f40fd52cd76fb693add9b214310e;p=imagemagick https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=7086 --- 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);