Skip to content

Commit

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

Please sign in to comment.