diff options
author | Cristy <mikayla-grace@urban-warrior.org> | 2021-01-03 06:33:21 -0500 |
---|---|---|
committer | Cristy <mikayla-grace@urban-warrior.org> | 2021-01-03 06:33:21 -0500 |
commit | 6836dadcc6722f86b9290f20959e40b7224c6db8 (patch) | |
tree | ea1ae62c672595c36e21b8e631933b7671969eec | |
parent | 00ac69ace982934d57df2a3dc0377ae31dcf077b (diff) | |
download | ImageMagick-6836dadcc6722f86b9290f20959e40b7224c6db8.tar.gz |
adjust default width/height resource limit for 32-bit systems
-rw-r--r-- | MagickCore/resource.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/MagickCore/resource.c b/MagickCore/resource.c index 55c39c710..657927a97 100644 --- a/MagickCore/resource.c +++ b/MagickCore/resource.c @@ -126,8 +126,8 @@ static ResourceInfo MagickULLConstant(0), /* initial thread */ MagickULLConstant(0), /* initial throttle */ MagickULLConstant(0), /* initial time */ - LONG_MAX/sizeof(Quantum)/MaxPixelChannels/2, /* width limit */ - LONG_MAX/sizeof(Quantum)/MaxPixelChannels/2, /* height limit */ + LONG_MAX/sizeof(Quantum)/5, /* width limit */ + LONG_MAX/sizeof(Quantum)/5, /* height limit */ MagickResourceInfinity, /* list length limit */ MagickULLConstant(3072)*1024*1024, /* area limit */ MagickULLConstant(1536)*1024*1024, /* memory limit */ @@ -1162,8 +1162,7 @@ MagickPrivate MagickBooleanType ResourceComponentGenesis(void) for (i=0; i < (ssize_t) NumberOfResourceTypes; i++) if (resource_semaphore[i] == (SemaphoreInfo *) NULL) resource_semaphore[i]=AcquireSemaphoreInfo(); - (void) SetMagickResourceLimit(WidthResource,(MagickSizeType) - sqrt(resource_info.width_limit)); + (void) SetMagickResourceLimit(WidthResource,resource_info.width_limit); limit=GetEnvironmentValue("MAGICK_WIDTH_LIMIT"); if (limit != (char *) NULL) { @@ -1171,8 +1170,7 @@ MagickPrivate MagickBooleanType ResourceComponentGenesis(void) 100.0)); limit=DestroyString(limit); } - (void) SetMagickResourceLimit(HeightResource,(MagickSizeType) - sqrt(resource_info.height_limit)); + (void) SetMagickResourceLimit(HeightResource,resource_info.height_limit); limit=GetEnvironmentValue("MAGICK_HEIGHT_LIMIT"); if (limit != (char *) NULL) { |