Commit 1224f4c3a for imagemagick.org

commit 1224f4c3a9189c42be8dae5c884910a6405dc88b
Author: Cristy <urban-warrior@imagemagick.org>
Date:   Tue Nov 10 14:20:21 2026 -0500

    https://github.com/ImageMagick/ImageMagick/security/advisories/GHSA-p5vf-jpj8-mmhm

diff --git a/coders/miff.c b/coders/miff.c
index 41b0cc287..27341dc25 100644
--- a/coders/miff.c
+++ b/coders/miff.c
@@ -1250,6 +1250,11 @@ static Image *ReadMIFFImage(const ImageInfo *image_info,
             if (colormap == (unsigned char *) NULL)
               ThrowMIFFException(ResourceLimitError,"MemoryAllocationFailed");
             count=ReadBlob(image,packet_size*image->colors,colormap);
+            if (count != (ssize_t) (packet_size*image->colors))
+              {
+                colormap=(unsigned char *) RelinquishMagickMemory(colormap);
+                ThrowMIFFException(CorruptImageError,"UnexpectedEndOfFile");
+              }
             p=colormap;
             switch (image->depth)
             {