From b0fe1aa7c2ed7becb892f121abdd68a6e6e0ce0b Mon Sep 17 00:00:00 2001 From: Cristy Date: Thu, 28 Mar 2019 20:35:53 -0400 Subject: [PATCH] https://github.com/ImageMagick/ImageMagick/issues/1532 --- coders/tiff.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/coders/tiff.c b/coders/tiff.c index 72abaf8dc..11387aa3a 100644 --- a/coders/tiff.c +++ b/coders/tiff.c @@ -3506,6 +3506,11 @@ static MagickBooleanType WriteTIFFImage(const ImageInfo *image_info, TIFFUnmapBlob); if (tiff == (TIFF *) NULL) return(MagickFalse); + if (exception->severity > ErrorException) + { + TIFFClose(tiff); + return(MagickFalse); + } (void) DeleteImageProfile(image,"tiff:37724"); scene=0; debug=IsEventLogging(); -- 2.40.0