Commit 985d46477 for imagemagick.org
commit 985d46477077f8047b85c70606ea07e105af27ca
Author: Cristy <urban-warrior@imagemagick.org>
Date: Sat Oct 24 17:16:21 2026 -0400
add max policy count
diff --git a/config/policy-limited.xml b/config/policy-limited.xml
index 1de2c63f8..2b3f03490 100644
--- a/config/policy-limited.xml
+++ b/config/policy-limited.xml
@@ -134,7 +134,8 @@
<!-- Maximum size of a single allocation request. -->
<policy domain="system" name="max-memory-request" value="512MiB"/>
- <!-- Maximum size of an image profile. -->
+ <!-- Maximum size and count of an image profile. -->
<policy domain="system" name="max-profile-size" value="16MiB"/>
+ <policy domain="system" name="max-profile-count" value="16"/>
</policymap>
diff --git a/config/policy-open.xml b/config/policy-open.xml
index 4e2e09f51..76b422558 100644
--- a/config/policy-open.xml
+++ b/config/policy-open.xml
@@ -204,9 +204,11 @@
<!-- <policy domain="system" name="max-memory-request"
value="256MiB"/> -->
- <!-- Maximum size of an image profile. -->
+ <!-- Maximum size and count of an image profile. -->
<!-- <policy domain="system" name="max-profile-size"
value="16MiB"/> -->
+ <!-- <policy domain="system" name="max-profile-count"
+ value="16"/> -->
<!-- Refuse paths whose basename is a symbolic link. -->
<!-- <policy domain="system"
diff --git a/config/policy-secure.xml b/config/policy-secure.xml
index 5fab78a18..036ada73e 100644
--- a/config/policy-secure.xml
+++ b/config/policy-secure.xml
@@ -131,8 +131,9 @@
<!-- Maximum single memory allocation request. -->
<policy domain="system" name="max-memory-request" value="256MiB"/>
- <!-- Maximum size of a single image profile. -->
+ <!-- Maximum size and count of a single image profile. -->
<policy domain="system" name="max-profile-size" value="16MiB"/>
+ <policy domain="system" name="max-profile-count" value="16"/>
<!-- Fail if the target path is a symbolic link. -->
<policy domain="system" name="symlink"
diff --git a/config/policy-websafe.xml b/config/policy-websafe.xml
index c02ad06ae..1c3505080 100644
--- a/config/policy-websafe.xml
+++ b/config/policy-websafe.xml
@@ -86,6 +86,7 @@
<!-- Maximum size of a single image profile. -->
<policy domain="system" name="max-profile-size" value="16MiB"/>
+ <policy domain="system" name="max-profile-count" value="16"/>
<!-- ============================================================= -->
<!-- Path Restrictions -->