]> granicus.if.org Git - imagemagick/commitdiff
https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=8863
authorCristy <urban-warrior@imagemagick.org>
Wed, 13 Jun 2018 23:05:32 +0000 (19:05 -0400)
committerCristy <urban-warrior@imagemagick.org>
Wed, 13 Jun 2018 23:05:32 +0000 (19:05 -0400)
coders/png.c

index 285daf8df45c70db96d605be5d2119b5174d25d8..058594e13e2e887061a27da23841a5333cede048 100644 (file)
@@ -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.  */