Commit f80b878e8 for imagemagick.org
commit f80b878e884f5b4e2b8f0b512d685701729f7def
Author: Cristy <urban-warrior@imagemagick.org>
Date: Fri Jun 5 09:06:21 2026 -0400
https://github.com/ImageMagick/ImageMagick/security/advisories/GHSA-3564-h588-56gr
diff --git a/coders/psd.c b/coders/psd.c
index 2a09ae98e..98b1b068a 100644
--- a/coders/psd.c
+++ b/coders/psd.c
@@ -1719,7 +1719,8 @@ static MagickBooleanType CheckPSDChannels(const Image *image,
PixelChannel
channel;
- if (layer_info->channel_info[i].size >= blob_size)
+ if ((layer_info->channel_info[i].size < 2) ||
+ (layer_info->channel_info[i].size >= blob_size))
return(MagickFalse);
if (layer_info->channel_info[i].supported == MagickFalse)
continue;