From: dirk Date: Sun, 21 Aug 2016 13:39:22 +0000 (+0200) Subject: Only resize in SetStringInfoLength when the length is different. X-Git-Tag: 7.0.2-10~13 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=cd9705d316dde3415dcd66908dba2c7e2206e4d4;p=imagemagick Only resize in SetStringInfoLength when the length is different. --- diff --git a/MagickCore/string.c b/MagickCore/string.c index 2f4998884..90da9cdb7 100644 --- a/MagickCore/string.c +++ b/MagickCore/string.c @@ -1780,6 +1780,8 @@ MagickExport void SetStringInfoLength(StringInfo *string_info, { assert(string_info != (StringInfo *) NULL); assert(string_info->signature == MagickCoreSignature); + if (string_info->length == length) + return; if (~length < MagickPathExtent) ThrowFatalException(ResourceLimitFatalError,"MemoryAllocationFailed"); string_info->length=length;