From f26d13bd5e0e2ad4dbd04677544906027edae46b Mon Sep 17 00:00:00 2001 From: Cristy Date: Wed, 13 Jun 2018 19:05:32 -0400 Subject: [PATCH] https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=8863 --- coders/png.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/coders/png.c b/coders/png.c index 285daf8df..058594e13 100644 --- a/coders/png.c +++ b/coders/png.c @@ -4248,7 +4248,7 @@ static Image *ReadPNGImage(const ImageInfo *image_info, status=OpenBlob(image_info,image,ReadBinaryBlobMode,exception); if (status == MagickFalse) - ThrowReaderException(FileOpenError,"UnableToOpenFile"); + return(DestroyImageList(image)); /* Verify PNG signature. @@ -5217,7 +5217,7 @@ static Image *ReadJNGImage(const ImageInfo *image_info, status=OpenBlob(image_info,image,ReadBinaryBlobMode,exception); if (status == MagickFalse) - return((Image *) NULL); + return(DestroyImageList(image)); if (LocaleCompare(image_info->magick,"JNG") != 0) ThrowReaderException(CorruptImageError,"ImproperImageHeader"); @@ -7730,7 +7730,7 @@ static Image *ReadMNGImage(const ImageInfo *image_info, status=OpenBlob(image_info,image,ReadBinaryBlobMode,exception); if (status == MagickFalse) - return((Image *) NULL); + return(DestroyImageList(image)); /* Allocate a MngInfo structure. */ -- 2.40.0