From 0af2661d72e04623a808227a98fe2328c2ab0b20 Mon Sep 17 00:00:00 2001 From: Cristy Date: Wed, 19 Dec 2018 08:28:58 -0500 Subject: [PATCH] https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=11930 --- coders/caption.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/coders/caption.c b/coders/caption.c index 93900b2c3..10417aef2 100644 --- a/coders/caption.c +++ b/coders/caption.c @@ -134,8 +134,9 @@ static Image *ReadCAPTIONImage(const ImageInfo *image_info, assert(exception != (ExceptionInfo *) NULL); assert(exception->signature == MagickCoreSignature); image=AcquireImage(image_info,exception); - (void) ResetImagePixels(image,exception); (void) ResetImagePage(image,"0x0+0+0"); + if ((image->columns != 0) && (image->rows != 0)) + (void) SetImageBackgroundColor(image); /* Format caption. */ -- 2.40.0