From 7adcba1310a2432f8bb74fead32addf59cef8f5b Mon Sep 17 00:00:00 2001 From: Cristy Date: Sat, 24 Mar 2018 09:20:44 -0400 Subject: [PATCH] ... --- coders/mat.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/coders/mat.c b/coders/mat.c index 9e0fd8ee1..3375aa63b 100644 --- a/coders/mat.c +++ b/coders/mat.c @@ -954,7 +954,7 @@ MATLAB_KO: while(!EOFBlob(image)) /* object parser loop */ { Frames = 1; - (void) SeekBlob(image,filepos,SEEK_SET); + if(SeekBlob(image,filepos,SEEK_SET) != filepos) break; /* printf("pos=%X\n",TellBlob(image)); */ MATLAB_HDR.DataType = ReadBlobXXXLong(image); @@ -1369,7 +1369,7 @@ done_reading: { z = z2; if(image2==NULL) image2 = image; - if (EOFBlob(image) == MagickFalse) + if(!EOFBlob(image) && TellBlob(image)