From c362a8c80ef1141510378a3e5759f5ab493c1f5f Mon Sep 17 00:00:00 2001 From: Glenn Randers-Pehrson Date: Mon, 7 Aug 2017 06:31:58 -0500 Subject: [PATCH] [libpng16] Free eXIf_buf when detecting bad byte-order specifier. --- pngrutil.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pngrutil.c b/pngrutil.c index d61736518..89a2bfdcc 100644 --- a/pngrutil.c +++ b/pngrutil.c @@ -2071,6 +2071,8 @@ png_handle_eXIf(png_structrp png_ptr, png_inforp info_ptr, png_uint_32 length) { png_crc_finish(png_ptr, length); png_chunk_benign_error(png_ptr, "incorrect byte-order specifier"); + png_free(png_ptr, info_ptr->eXIf_buf); + info_ptr->eXIf_buf = NULL; return; } }