Commit 87f619bcd for imagemagick.org

commit 87f619bcd066a3c8e8fae4addb99f15d496ae881
Author: Cristy <urban-warrior@imagemagick.org>
Date:   Sun Feb 22 19:02:12 2026 -0500

    https://github.com/ImageMagick/ImageMagick/security/advisories/GHSA-wj8w-pjxf-9g4f

diff --git a/coders/jbig.c b/coders/jbig.c
index a0b2fb466..911eecd3f 100644
--- a/coders/jbig.c
+++ b/coders/jbig.c
@@ -197,6 +197,13 @@ static Image *ReadJBIGImage(const ImageInfo *image_info,
       length-=(ssize_t) count;
     }
   } while ((status == JBG_EAGAIN) || (status == JBG_EOK));
+  if (status != JBG_EOK)
+    {
+      jbg_dec_free(&jbig_info);
+      buffer=(unsigned char *) RelinquishMagickMemory(buffer);
+      ThrowReaderException(CorruptImageError,"UnableToReadImageData");
+    }
+
   /*
     Create colormap.
   */