]> granicus.if.org Git - imagemagick/commitdiff
Add check to ensure security policy is instantiated
authorCristy <urban-warrior@imagemagick.org>
Sat, 24 Jun 2017 11:50:40 +0000 (07:50 -0400)
committerCristy <urban-warrior@imagemagick.org>
Sat, 24 Jun 2017 11:51:53 +0000 (07:51 -0400)
MagickCore/policy.c

index 8c8aa5379e6e9601c721e4e91f677869587cb9bd..39d1a11d3ffeb5621d852f387c941b1a9ec28de2 100644 (file)
@@ -1074,6 +1074,8 @@ MagickExport MagickBooleanType SetMagickSecurityPolicy(const char *policy,
   MagickBooleanType
     status;
   
+  if (IsPolicyCacheInstantiated(exception) == MagickFalse)
+    return((PolicyInfo *) NULL);
   LockSemaphoreInfo(policy_semaphore);
   ResetLinkedListIterator(policy_cache);
   p=(PolicyInfo *) GetNextValueInLinkedList(policy_cache);