From 5919f49e2db8ae7c07732408b04d61baff912b03 Mon Sep 17 00:00:00 2001 From: Cristy Date: Mon, 30 Apr 2018 16:41:08 -0400 Subject: [PATCH] https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=8096 --- MagickCore/draw.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/MagickCore/draw.c b/MagickCore/draw.c index 2a57f6c18..703a615f7 100644 --- a/MagickCore/draw.c +++ b/MagickCore/draw.c @@ -2128,6 +2128,9 @@ MagickExport MagickBooleanType DrawImage(Image *image,const DrawInfo *draw_info, clip_path=GetNodeByURL(primitive,token); if (clip_path != (char *) NULL) { + if (graphic_context[n]->clipping_mask != (Image *) NULL) + graphic_context[n]->clipping_mask= + DestroyImage(graphic_context[n]->clipping_mask); graphic_context[n]->clipping_mask=DrawClippingMask(image, graphic_context[n],clip_path,exception); clip_path=DestroyString(clip_path); -- 2.40.0