From 448492b929894ecbfb1007c3cee5c45ce9c6cba3 Mon Sep 17 00:00:00 2001 From: Cristy Date: Wed, 26 Apr 2017 16:22:19 -0400 Subject: [PATCH] https://github.com/ImageMagick/ImageMagick/issues/444 --- coders/aai.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/coders/aai.c b/coders/aai.c index cecad800d..0da2902bc 100644 --- a/coders/aai.c +++ b/coders/aai.c @@ -171,7 +171,10 @@ static Image *ReadAAIImage(const ImageInfo *image_info,ExceptionInfo *exception) { count=ReadBlob(image,length,pixels); if (count != (ssize_t) length) - ThrowReaderException(CorruptImageError,"UnableToReadImageData"); + { + pixels=(unsigned char *) RelinquishMagickMemory(pixels); + ThrowReaderException(CorruptImageError,"UnableToReadImageData"); + } p=pixels; q=QueueAuthenticPixels(image,0,y,image->columns,1,exception); if (q == (Quantum *) NULL) -- 2.40.0