Commit 37628591a for imagemagick.org
commit 37628591ad5f7df67c3e8152ad36eb91ebb0ce65
Author: haoxiang Yan <108142374+Yanhaoxi@users.noreply.github.com>
Date: Fri Sep 18 21:23:43 2026 +0800
Added missing check for eof in DiscardBlobBytes to prevent a retry loop (#8967)
diff --git a/MagickCore/blob.c b/MagickCore/blob.c
index 9ca7a21d1..4a67b6a1e 100644
--- a/MagickCore/blob.c
+++ b/MagickCore/blob.c
@@ -1211,6 +1211,8 @@ MagickExport MagickBooleanType DiscardBlobBytes(Image *image,
(void) ReadBlobStream(image,quantum,buffer,&count);
if (count <= 0)
{
+ if (count == 0)
+ break; /* EOF is terminal, errno may hold a stale EINTR */
count=0;
if (errno != EINTR)
break;