Commit 5b3c9dd5f for imagemagick.org

commit 5b3c9dd5fcfea139651be3bc5e89ce1dca709273
Author: Cristy <urban-warrior@imagemagick.org>
Date:   Sat Oct 3 08:30:44 2026 -0400

    https://github.com/ImageMagick/ImageMagick/security/advisories/GHSA-79p5-w6jv-r997

diff --git a/MagickCore/policy.c b/MagickCore/policy.c
index f5f943b46..85d66468a 100644
--- a/MagickCore/policy.c
+++ b/MagickCore/policy.c
@@ -908,7 +908,11 @@ MagickExport MagickBooleanType IsRightsAuthorizedByName(
           If this matched a canonical form, retain the last matching rights.
         */
         canonical_matched_any=MagickTrue;
-        canonical_allowed_accumulator=policy->rights;
+        if (policy->domain != PathPolicyDomain)
+          canonical_allowed_accumulator=policy->rights;
+        else
+          canonical_allowed_accumulator=(PolicyRights) ((int)
+            canonical_allowed_accumulator & (int) policy->rights);
       }
   }
   UnlockSemaphoreInfo(policy_semaphore);