From cd9705d316dde3415dcd66908dba2c7e2206e4d4 Mon Sep 17 00:00:00 2001 From: dirk Date: Sun, 21 Aug 2016 15:39:22 +0200 Subject: [PATCH] Only resize in SetStringInfoLength when the length is different. --- MagickCore/string.c | 2 ++ 1 file changed, 2 insertions(+) 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; -- 2.40.0