summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGlenn Randers-Pehrson <glennrp at users.sourceforge.net>2018-03-29 10:37:12 -0500
committerGlenn Randers-Pehrson <glennrp at users.sourceforge.net>2018-03-29 10:37:12 -0500
commit916117d97058b37e7eef2558a71919a8a073a3d3 (patch)
tree3924c9b68fd8002ea1692a9e21c7216ae09b7f37
parent7784cd3f6fba5008a83c869e401cb92e338b2c62 (diff)
downloadlibpng-916117d97058b37e7eef2558a71919a8a073a3d3.tar.gz
[libpng16] Allow compresion-type to be NULL in png_set_iCCP().
-rw-r--r--pngget.c3
1 files changed, 2 insertions, 1 deletions
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);
}