]> granicus.if.org Git - imagemagick/commitdiff
https://github.com/ImageMagick/ImageMagick/issues/444
authorCristy <urban-warrior@imagemagick.org>
Wed, 26 Apr 2017 20:22:19 +0000 (16:22 -0400)
committerCristy <urban-warrior@imagemagick.org>
Wed, 26 Apr 2017 20:22:19 +0000 (16:22 -0400)
coders/aai.c

index cecad800d87d87c98d498bcfe380f16330707989..0da2902bc43d23e1a847efdf41c3b19c5d8b1df6 100644 (file)
@@ -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)