]> granicus.if.org Git - imagemagick/commitdiff
https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=6194
authorCristy <urban-warrior@imagemagick.org>
Sat, 10 Feb 2018 13:28:01 +0000 (08:28 -0500)
committerCristy <urban-warrior@imagemagick.org>
Sat, 10 Feb 2018 13:28:01 +0000 (08:28 -0500)
coders/caption.c
coders/label.c

index 0d8351e2be7c3e63eb0be6c29ec85a1d8d6d52c4..57c97fcdbc2c8d5a169a84752b88ba12c6111b07 100644 (file)
@@ -150,7 +150,7 @@ static Image *ReadCAPTIONImage(const ImageInfo *image_info,
       property=InterpretImageProperties((ImageInfo *) image_info,image,option,
         exception);
   if (property == (char *) NULL)
-    return((Image *) NULL);
+    return(DestroyImageList(image));
   (void) SetImageProperty(image,"caption",property,exception);
   property=DestroyString(property);
   caption=ConstantString(GetImageProperty(image,"caption",exception));
index 6fdc1c5870463ef9f08596074a43fcdc79205f3f..866beb8e24e5cf8b22a7ab3bcc9653ad67556041 100644 (file)
@@ -127,7 +127,7 @@ static Image *ReadLABELImage(const ImageInfo *image_info,
   property=InterpretImageProperties((ImageInfo *) image_info,image,
     image_info->filename,exception);
   if (property == (char *) NULL)
-    return((Image *) NULL);
+    return(DestroyImageList(image));
   (void) SetImageProperty(image,"label",property,exception);
   property=DestroyString(property);
   label=GetImageProperty(image,"label",exception);