From: Cristy Date: Wed, 26 Apr 2017 20:22:19 +0000 (-0400) Subject: https://github.com/ImageMagick/ImageMagick/issues/444 X-Git-Tag: 7.0.5-6~53 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=448492b929894ecbfb1007c3cee5c45ce9c6cba3;p=imagemagick https://github.com/ImageMagick/ImageMagick/issues/444 --- 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)