Skip to content
Permalink
Browse files Browse the repository at this point in the history
Added check for invalid number of frames.
  • Loading branch information
dlemstra committed May 29, 2016
1 parent 36ad94e commit 8a370f9
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion coders/mat.c
Expand Up @@ -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");
}
Expand Down

0 comments on commit 8a370f9

Please sign in to comment.