Commit e3812ff1c for imagemagick.org
commit e3812ff1c97ba2adf0bb907a4598a272e606a49a
Author: Kalt2212 <107548841+kalt2212@users.noreply.github.com>
Date: Wed Oct 7 14:26:23 2026 -0700
coders/xps: add missing list-length resource guard in ReadXPSImage (#9006)
diff --git a/coders/xps.c b/coders/xps.c
index 6ea7b425c..1d8dd7cd2 100644
--- a/coders/xps.c
+++ b/coders/xps.c
@@ -362,6 +362,8 @@ static Image *ReadXPSImage(const ImageInfo *image_info,ExceptionInfo *exception)
/*
Add place holder images to meet the subimage specification requirement.
*/
+ if (AcquireMagickResource(ListLengthResource,image_info->scene) == MagickFalse)
+ ThrowReaderException(ResourceLimitError,"ListLengthExceedsLimit");
for (i=0; i < (ssize_t) image_info->scene; i++)
{
clone_image=CloneImage(postscript_image,1,1,MagickTrue,exception);