Skip to content

Commit

Permalink
allow for EOF
Browse files Browse the repository at this point in the history
  • Loading branch information
Cristy committed Oct 30, 2022
1 parent 3e481e0 commit 8bb5871
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion magick/blob.c
Original file line number Diff line number Diff line change
Expand Up @@ -4273,7 +4273,8 @@ MagickExport char *ReadBlobString(Image *image,char *string)
case FileStream:
{
char *p = fgets(string,MagickPathExtent,blob_info->file_info.file);
if (p == (char *) NULL)
if ((p == (char *) NULL) &&
(ferror(blob_info->file_info.file) != 0))
{
ThrowBlobException(blob_info);
return((char *) NULL);
Expand Down

0 comments on commit 8bb5871

Please sign in to comment.