From a678ee79a7c5380183d3edaa4cf4f0ca6cb75d3d Mon Sep 17 00:00:00 2001 From: Cristy Date: Sat, 24 Jun 2017 10:42:26 -0400 Subject: [PATCH] https://github.com/ImageMagick/ImageMagick/issues/525 --- coders/mat.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/coders/mat.c b/coders/mat.c index 04af93d4f..b8e013fdb 100644 --- a/coders/mat.c +++ b/coders/mat.c @@ -893,7 +893,7 @@ static Image *ReadMATImage(const ImageInfo *image_info,ExceptionInfo *exception) Read MATLAB image. */ quantum_info=(QuantumInfo *) NULL; - clone_info=CloneImageInfo(image_info); + clone_info=(ImageInfo *) NULL; if (ReadBlob(image,124,(unsigned char *) &MATLAB_HDR.identific) != 124) ThrowReaderException(CorruptImageError,"ImproperImageHeader"); if (strncmp(MATLAB_HDR.identific,"MATLAB",6) != 0) @@ -946,6 +946,7 @@ MATLAB_KO: ThrowReaderException(CorruptImageError,"ImproperImageHeader"); if(EOFBlob(image)) break; filepos += MATLAB_HDR.ObjectSize + 4 + 4; + clone_info=CloneImageInfo(image_info); image2 = image; #if defined(MAGICKCORE_ZLIB_DELEGATE) if(MATLAB_HDR.DataType == miCOMPRESSED) -- 2.40.0