Commit 19bce64e3 for imagemagick.org
commit 19bce64e3667ff0348d559e2526c850f8fbe2b5a
Author: Cristy <urban-warrior@imagemagick.org>
Date: Mon Aug 3 18:31:02 2026 -0400
https://github.com/ImageMagick/ImageMagick/security/advisories/GHSA-wxw6-98rj-hjfr
diff --git a/coders/cals.c b/coders/cals.c
index 544d1a195..1350b43d3 100644
--- a/coders/cals.c
+++ b/coders/cals.c
@@ -249,6 +249,9 @@ static Image *ReadCALSImage(const ImageInfo *image_info,
}
}
}
+ if ((width == 0) || (height == 0) || (type != 1) ||
+ (orientation == 0) || (density == 0))
+ ThrowReaderException(CorruptImageError,"ImproperImageHeader");
/*
Read CALS pixels.
*/