Commit 78aff3a7a for imagemagick.org

commit 78aff3a7a1d3decb0e463a2e7bdb36be48c84f6d
Author: Dirk Lemstra <dirk@lemstra.org>
Date:   Fri Aug 28 10:26:52 2026 +0200

    Added missing check for eof when using the custom stream reader in ReadBlob

diff --git a/MagickCore/blob.c b/MagickCore/blob.c
index 346f4b0f2..21fbf4c23 100644
--- a/MagickCore/blob.c
+++ b/MagickCore/blob.c
@@ -4031,8 +4031,15 @@ MagickExport ssize_t ReadBlob(Image *image,const size_t length,void *data)
     case CustomStream:
     {
       if (blob_info->custom_stream->reader != (CustomStreamHandler) NULL)
-        count=blob_info->custom_stream->reader(q,length,
-          blob_info->custom_stream->data);
+        {
+          count=blob_info->custom_stream->reader(q,length,
+            blob_info->custom_stream->data);
+          if (count <= 0)
+            {
+              blob_info->eof=MagickTrue;
+              count=0;
+            }
+        }
       break;
     }
   }