From: Cristy Date: Mon, 13 Mar 2017 11:50:39 +0000 (-0400) Subject: ... X-Git-Tag: 7.0.5-3~15 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=0865163bc79ecdf7ed608340017bd36b2c795562;p=imagemagick ... --- diff --git a/MagickCore/cache.c b/MagickCore/cache.c index 7c76cdf03..82fe3b69a 100644 --- a/MagickCore/cache.c +++ b/MagickCore/cache.c @@ -190,7 +190,7 @@ MagickPrivate Cache AcquirePixelCache(const size_t number_threads) *magick_restrict cache_info; char - *synchronize; + *value; cache_info=(CacheInfo *) AcquireQuantumMemory(1,sizeof(*cache_info)); if (cache_info == (CacheInfo *) NULL) @@ -211,11 +211,17 @@ MagickPrivate Cache AcquirePixelCache(const size_t number_threads) cache_info->nexus_info=AcquirePixelCacheNexus(cache_info->number_threads); if (cache_info->nexus_info == (NexusInfo **) NULL) ThrowFatalException(ResourceLimitFatalError,"MemoryAllocationFailed"); - synchronize=GetEnvironmentValue("MAGICK_SYNCHRONIZE"); - if (synchronize != (const char *) NULL) + value=GetEnvironmentValue("MAGICK_SYNCHRONIZE"); + if (value != (const char *) NULL) { - cache_info->synchronize=IsStringTrue(synchronize); - synchronize=DestroyString(synchronize); + cache_info->synchronize=IsStringTrue(value); + value=DestroyString(value); + } + value=GetPolicyValue("synchronize"); + if (value != (const char *) NULL) + { + cache_info->synchronize=IsStringTrue(value); + value=DestroyString(value); } cache_info->semaphore=AcquireSemaphoreInfo(); cache_info->reference_count=1; diff --git a/config/policy.xml b/config/policy.xml index 80e675fdf..b0df62995 100644 --- a/config/policy.xml +++ b/config/policy.xml @@ -65,6 +65,7 @@ +