]> granicus.if.org Git - imagemagick/commitdiff
...
authorCristy <urban-warrior@imagemagick.org>
Tue, 14 Aug 2018 13:31:19 +0000 (09:31 -0400)
committerCristy <urban-warrior@imagemagick.org>
Tue, 14 Aug 2018 13:31:19 +0000 (09:31 -0400)
coders/mat.c

index 259c8158b52130d5b47e0bc6a22c6702a2885e96..0f9a5f44843b50b99372eae1ec798b3e703e4d2c 100644 (file)
@@ -1117,7 +1117,9 @@ MATLAB_KO:
       (void) LogMagickEvent(CoderEvent,GetMagickModule(),
         "MATLAB_HDR.CellType: %.20g",(double) CellType);
 
-    (void) ReadBlob(image2, 4, (unsigned char *) &size);     /* data size */
+    /* data size */
+    if (ReadBlob(image2, 4, (unsigned char *) &size) != 4)
+      goto MATLAB_KO;
 
     NEXT_FRAME:
     switch (CellType)