Commit 3aa357413 for imagemagick.org
commit 3aa35741316909f9e384d13cee197334dc3296d7
Author: Cristy <urban-warrior@imagemagick.org>
Date: Tue May 12 12:28:23 2026 -0400
https://github.com/ImageMagick/ImageMagick/security/advisories/GHSA-36wm-hprc-mcf5
diff --git a/coders/ipl.c b/coders/ipl.c
index dff9d68d4..9c10dff54 100644
--- a/coders/ipl.c
+++ b/coders/ipl.c
@@ -630,6 +630,13 @@ static MagickBooleanType WriteIPLImage(const ImageInfo *image_info,Image *image,
/*
Convert MIFF to IPL raster pixels.
*/
+ if (SetQuantumDepth(image,quantum_info,quantum_info->depth) == MagickFalse)
+ {
+ (void) ThrowMagickException(exception,GetMagickModule(),
+ CorruptImageError,"AnErrorHasOccurredWritingToFile","`%s'",
+ image->filename);
+ break;
+ }
pixels=(unsigned char *) GetQuantumPixels(quantum_info);
if(ipl_info.colors == 1){
/* Red frame */