From: Dirk Lemstra Date: Sat, 14 Apr 2018 11:43:24 +0000 (+0200) Subject: Fixed refactor mistake. X-Git-Tag: 7.0.7-29~112 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=c06b745f228d26710d35b0121745f13d4c3a54b4;p=imagemagick Fixed refactor mistake. --- diff --git a/coders/miff.c b/coders/miff.c index 5d7a4f0df..f7f7c5f84 100644 --- a/coders/miff.c +++ b/coders/miff.c @@ -2421,15 +2421,18 @@ static MagickBooleanType WriteMIFFImage(const ImageInfo *image_info, } if (image->storage_class == PseudoClass) { + size_t + colormap_size; + unsigned char *colormap; /* Allocate colormap. */ - packet_size=(size_t) (3*quantum_info->depth/8); + colormap_size=(size_t) (3*quantum_info->depth/8); colormap=(unsigned char *) AcquireQuantumMemory(image->colors, - packet_size*sizeof(*colormap)); + colormap_size*sizeof(*colormap)); if (colormap == (unsigned char *) NULL) ThrowWriterException(ResourceLimitError,"MemoryAllocationFailed"); /* @@ -2492,7 +2495,7 @@ static MagickBooleanType WriteMIFFImage(const ImageInfo *image_info, } } } - (void) WriteBlob(image,packet_size*image->colors,colormap); + (void) WriteBlob(image,colormap_size*image->colors,colormap); colormap=(unsigned char *) RelinquishMagickMemory(colormap); } /*