Skip to content

Commit

Permalink
https://github.com/ImageMagick/ImageMagick/issues/591
Browse files Browse the repository at this point in the history
  • Loading branch information
Cristy committed Jul 19, 2017
1 parent cd494bc commit 83e0f8f
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions coders/txt.c
Original file line number Diff line number Diff line change
Expand Up @@ -563,6 +563,12 @@ static Image *ReadTXTImage(const ImageInfo *image_info,ExceptionInfo *exception)
break;
}
}
if (EOFBlob(image) != MagickFalse)
{
ThrowFileException(exception,CorruptImageError,"UnexpectedEndOfFile",
image->filename);
break;
}
(void) ReadBlobString(image,text);
if (LocaleNCompare((char *) text,MagickID,strlen(MagickID)) == 0)
{
Expand Down

0 comments on commit 83e0f8f

Please sign in to comment.