From f0649393346ecd85cf602f8903f8f45b6e796b84 Mon Sep 17 00:00:00 2001 From: Cristy Date: Wed, 26 Apr 2017 17:21:42 -0400 Subject: [PATCH] https://github.com/ImageMagick/ImageMagick/issues/450 --- coders/mtv.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/coders/mtv.c b/coders/mtv.c index 1f5551b50..688248a59 100644 --- a/coders/mtv.c +++ b/coders/mtv.c @@ -172,7 +172,10 @@ static Image *ReadMTVImage(const ImageInfo *image_info,ExceptionInfo *exception) { count=(ssize_t) ReadBlob(image,(size_t) (3*image->columns),pixels); if (count != (ssize_t) (3*image->columns)) - 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.50.1