From 2537827ce5ed9c197d49af4753df4cfeacdb4664 Mon Sep 17 00:00:00 2001 From: Dirk Lemstra Date: Fri, 28 Jun 2019 11:35:15 +0200 Subject: [PATCH] Minor refactoring. --- coders/gif.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/coders/gif.c b/coders/gif.c index 529f3a11d..a37e2d684 100644 --- a/coders/gif.c +++ b/coders/gif.c @@ -1169,15 +1169,15 @@ static Image *ReadGIFImage(const ImageInfo *image_info,ExceptionInfo *exception) MagickTrue : MagickFalse; (void) LogMagickEvent(CoderEvent,GetMagickModule(), " Reading GIF application extension"); - info=(unsigned char *) AcquireQuantumMemory(255UL, - sizeof(*info)); + reserved_length=255; + info=(unsigned char *) AcquireQuantumMemory((size_t) + reserved_length,sizeof(*info)); if (info == (unsigned char *) NULL) ThrowGIFException(ResourceLimitError, "MemoryAllocationFailed"); - reserved_length=255; for (info_length=0; ; ) { - block_length=(int) ReadBlobBlock(image,&info[info_length]); + block_length=(int) ReadBlobBlock(image,info+info_length); if (block_length == 0) break; info_length+=block_length; -- 2.40.0