Skip to content

Commit 83e0f8f

Browse files
author
Cristy
committed
https://github.com/ImageMagick/ImageMagick/issues/591
1 parent cd494bc commit 83e0f8f

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

Diff for: coders/txt.c

+6
Original file line numberDiff line numberDiff line change
@@ -563,6 +563,12 @@ static Image *ReadTXTImage(const ImageInfo *image_info,ExceptionInfo *exception)
563563
break;
564564
}
565565
}
566+
if (EOFBlob(image) != MagickFalse)
567+
{
568+
ThrowFileException(exception,CorruptImageError,"UnexpectedEndOfFile",
569+
image->filename);
570+
break;
571+
}
566572
(void) ReadBlobString(image,text);
567573
if (LocaleNCompare((char *) text,MagickID,strlen(MagickID)) == 0)
568574
{

0 commit comments

Comments
 (0)