Skip to content

Commit a8f9c2a

Browse files
author
Cristy
committed
https://github.com/ImageMagick/ImageMagick/issues/591
1 parent af2e7e8 commit a8f9c2a

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
@@ -580,6 +580,12 @@ static Image *ReadTXTImage(const ImageInfo *image_info,ExceptionInfo *exception)
580580
break;
581581
}
582582
}
583+
if (EOFBlob(image) != MagickFalse)
584+
{
585+
ThrowFileException(exception,CorruptImageError,"UnexpectedEndOfFile",
586+
image->filename);
587+
break;
588+
}
583589
(void) ReadBlobString(image,text);
584590
if (LocaleNCompare((char *) text,MagickID,strlen(MagickID)) == 0)
585591
{

0 commit comments

Comments
 (0)