From: Dirk Lemstra Date: Mon, 15 May 2017 19:18:13 +0000 (+0200) Subject: Fixed incorrect call to WriteBlob reported in #490. X-Git-Tag: 7.0.5-7~12 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=f0232a2a45dfd003c1faf6079497895df3ab0ee1;p=imagemagick Fixed incorrect call to WriteBlob reported in #490. --- diff --git a/coders/png.c b/coders/png.c index c194d0858..cfd684400 100644 --- a/coders/png.c +++ b/coders/png.c @@ -4782,10 +4782,11 @@ static Image *ReadOneJNGImage(MngInfo *mng_info, (void) LogMagickEvent(CoderEvent,GetMagickModule(), " Copying JDAT chunk data to color_blob."); - (void) WriteBlob(color_image,length,chunk); - if (length != 0) - chunk=(unsigned char *) RelinquishMagickMemory(chunk); + { + (void) WriteBlob(color_image,length,chunk); + chunk=(unsigned char *) RelinquishMagickMemory(chunk); + } continue; }