From 8d9991d2dbf158bf826d1fe3ee508e8f4434a039 Mon Sep 17 00:00:00 2001 From: Glenn Randers-Pehrson Date: Fri, 12 Aug 2016 06:35:25 -0500 Subject: [PATCH] [libpng16] Revert using png_malloc_array in iCCP chunk handling --- pngrutil.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pngrutil.c b/pngrutil.c index a92b14227..405eae456 100644 --- a/pngrutil.c +++ b/pngrutil.c @@ -307,7 +307,7 @@ png_read_buffer(png_structrp png_ptr, png_alloc_size_t new_size, int warn) if (buffer == NULL) { - buffer = png_voidcast(png_bytep, png_malloc_array(png_ptr, 1, new_size)); + buffer = png_voidcast(png_bytep, png_malloc_base(png_ptr, new_size)); if (buffer != NULL) { @@ -1528,8 +1528,8 @@ png_handle_iCCP(png_structrp png_ptr, png_inforp info_ptr, png_uint_32 length) PNG_FREE_ICCP, 0); info_ptr->iccp_name = png_voidcast(char*, - png_malloc_array(png_ptr, - keyword_length+1, 1)); + png_malloc_base(png_ptr, + keyword_length+1)); if (info_ptr->iccp_name != NULL) { memcpy(info_ptr->iccp_name, keyword,