Skip to content
Permalink
Browse files

Added check for invalid number of frames.

  • Loading branch information...
dlemstra committed May 29, 2016
1 parent 36ad94e commit 8a370f9ab120faf182aa160900ba692ba8e2bcf0
Showing with 3 additions and 1 deletion.
  1. +3 −1 coders/mat.c
@@ -942,7 +942,9 @@ MATLAB_KO: ThrowReaderException(CorruptImageError,"ImproperImageHeader");
case 16: z2=z = ReadBlobXXXLong(image2); /* 4D matrix animation */
if(z!=3 && z!=1)
ThrowReaderException(CoderError, "MultidimensionalMatricesAreNotSupported");
Frames = ReadBlobXXXLong(image2);
Frames = ReadBlobXXXLong(image2);
if (Frames == 0)
ThrowReaderException(CorruptImageError,"ImproperImageHeader");
break;
default: ThrowReaderException(CoderError, "MultidimensionalMatricesAreNotSupported");
}

0 comments on commit 8a370f9

Please sign in to comment.
You can’t perform that action at this time.