From 93a9ccc85bd62b21bc4246fc6a8c2b7a32f8d678 Mon Sep 17 00:00:00 2001 From: Cristy Date: Thu, 8 Feb 2018 20:07:47 -0500 Subject: [PATCH] https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=6152 --- coders/caption.c | 2 ++ coders/label.c | 2 ++ 2 files changed, 4 insertions(+) diff --git a/coders/caption.c b/coders/caption.c index 3dc16636e..0d8351e2b 100644 --- a/coders/caption.c +++ b/coders/caption.c @@ -149,6 +149,8 @@ static Image *ReadCAPTIONImage(const ImageInfo *image_info, else property=InterpretImageProperties((ImageInfo *) image_info,image,option, exception); + if (property == (char *) NULL) + return((Image *) NULL); (void) SetImageProperty(image,"caption",property,exception); property=DestroyString(property); caption=ConstantString(GetImageProperty(image,"caption",exception)); diff --git a/coders/label.c b/coders/label.c index 60d00e3ff..6fdc1c587 100644 --- a/coders/label.c +++ b/coders/label.c @@ -126,6 +126,8 @@ static Image *ReadLABELImage(const ImageInfo *image_info, (void) ResetImagePage(image,"0x0+0+0"); property=InterpretImageProperties((ImageInfo *) image_info,image, image_info->filename,exception); + if (property == (char *) NULL) + return((Image *) NULL); (void) SetImageProperty(image,"label",property,exception); property=DestroyString(property); label=GetImageProperty(image,"label",exception); -- 2.40.0