From 8bb58713b7a8896fe992dcbf175ee283713d8069 Mon Sep 17 00:00:00 2001 From: Cristy Date: Sun, 30 Oct 2022 18:14:41 -0400 Subject: [PATCH] allow for EOF --- magick/blob.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/magick/blob.c b/magick/blob.c index d64042100d..b479ee8bf4 100644 --- a/magick/blob.c +++ b/magick/blob.c @@ -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);