[libpng16] Initialized btoa[] in pngstest.c; stop memory leak in png_handle_eXIf()

when returning with an error.
This commit is contained in:
Glenn Randers-Pehrson 2017-08-01 15:24:21 -05:00
parent 4aad3c0eb0
commit bc68c41d5f
4 changed files with 12 additions and 1 deletions

View File

@ -39,6 +39,10 @@ Version 1.6.32beta01 [July 31, 2017]
Version 1.6.32beta02 [August 1, 2017]
Updated contrib/libtests/pngunknown.c with eXIf chunk.
Version 1.6.32beta03 [August 1, 2017]
Initialized btoa[] in pngstest.c
Stop memory leak when returning from png_handle_eXIf() with an error.
Send comments/corrections/commendations to png-mng-implement at lists.sf.net
(subscription required; visit
https://lists.sourceforge.net/lists/listinfo/png-mng-implement

View File

@ -5922,6 +5922,10 @@ Version 1.6.32beta01 [July 31, 2017]
Version 1.6.32beta02 [August 1, 2017]
Updated contrib/libtests/pngunknown.c with eXIf chunk.
Version 1.6.32beta03 [August 1, 2017]
Initialized btoa[] in pngstest.c
Stop memory leak when returning from png_handle_eXIf() with an error.
Send comments/corrections/commendations to png-mng-implement at lists.sf.net
(subscription required; visit
https://lists.sourceforge.net/lists/listinfo/png-mng-implement

View File

@ -2610,9 +2610,9 @@ compare_two_images(Image *a, Image *b, int via_linear,
const unsigned int b_sample = PNG_IMAGE_SAMPLE_SIZE(formatb);
int alpha_added, alpha_removed;
int bchannels;
int btoa[4];
png_uint_32 y;
Transform tr;
int btoa[4]={0,0,0,0};
/* This should never happen: */
if (width != b->image.width || height != b->image.height)

View File

@ -2039,7 +2039,10 @@ png_handle_eXIf(png_structrp png_ptr, png_inforp info_ptr, png_uint_32 length)
}
if (png_crc_finish(png_ptr, 0) != 0)
{
png_free(png_ptr, eXIf_buf);
return;
}
png_set_eXIf_1(png_ptr, info_ptr, length, eXIf_buf);