From 916117d97058b37e7eef2558a71919a8a073a3d3 Mon Sep 17 00:00:00 2001 From: Glenn Randers-Pehrson Date: Thu, 29 Mar 2018 10:37:12 -0500 Subject: [PATCH] [libpng16] Allow compresion-type to be NULL in png_set_iCCP(). --- pngget.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pngget.c b/pngget.c index 5c435dcdc..b888db366 100644 --- a/pngget.c +++ b/pngget.c @@ -749,7 +749,8 @@ png_get_iCCP(png_const_structrp png_ptr, png_inforp info_ptr, /* This is somewhat irrelevant since the profile data returned has * actually been uncompressed. */ - *compression_type = PNG_COMPRESSION_TYPE_BASE; + if (compression_type != NULL) + *compression_type = PNG_COMPRESSION_TYPE_BASE; return (PNG_INFO_iCCP); }