]> granicus.if.org Git - imagemagick/commitdiff
https://github.com/ImageMagick/ImageMagick/issues/525
authorCristy <urban-warrior@imagemagick.org>
Sat, 24 Jun 2017 14:42:26 +0000 (10:42 -0400)
committerCristy <urban-warrior@imagemagick.org>
Sat, 24 Jun 2017 14:42:26 +0000 (10:42 -0400)
coders/mat.c

index 04af93d4f53fb2909eb729503db6f00cd3f37e28..b8e013fdb1daad0a3116e76a9faf45b0e0bc8d24 100644 (file)
@@ -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)