Skip to content
Permalink
Browse files Browse the repository at this point in the history
Fixed incorrect call to WriteBlob reported in #490.
  • Loading branch information
dlemstra committed May 15, 2017
1 parent 0c5b1e4 commit f0232a2
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions coders/png.c
Expand Up @@ -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;
}
Expand Down

0 comments on commit f0232a2

Please sign in to comment.