Commit e9872c4a1 for imagemagick.org
commit e9872c4a165d869e75d10799c47195725ebf4132
Author: Cristy <urban-warrior@imagemagick.org>
Date: Fri Sep 18 09:22:13 2026 -0400
https://github.com/ImageMagick/ImageMagick/security/advisories/GHSA-m9c7-gf3j-hx6h
diff --git a/MagickCore/blob.c b/MagickCore/blob.c
index fda922f5c..9ca7a21d1 100644
--- a/MagickCore/blob.c
+++ b/MagickCore/blob.c
@@ -1318,7 +1318,8 @@ MagickExport int EOFBlob(const Image *image)
status=0;
(void) BZ2_bzerror(blob_info->file_info.bzfile,&status);
- blob_info->eof=status == BZ_UNEXPECTED_EOF ? MagickTrue : MagickFalse;
+ if (status == BZ_UNEXPECTED_EOF)
+ blob_info->eof=MagickTrue;
#endif
break;
}
@@ -4049,6 +4050,8 @@ MagickExport ssize_t ReadBlob(Image *image,const size_t length,void *data)
(void) BZ2_bzerror(blob_info->file_info.bzfile,&status);
if ((count != (ssize_t) length) && (status != BZ_OK))
ThrowBlobException(blob_info);
+ if ((count != (ssize_t) length) && (status == BZ_OK))
+ blob_info->eof=MagickTrue;
#endif
break;
}