From 36694673479aa89305b2b122c8c3300adea017c8 Mon Sep 17 00:00:00 2001 From: Glenn Randers-Pehrson Date: Fri, 22 Aug 2014 08:55:50 -0500 Subject: [PATCH] [libpng16] Guard usage of png_ptr->options with #ifdef PNG_SET_OPTION_SUPPORTED. --- ANNOUNCE | 1 + CHANGES | 1 + png.c | 2 ++ 3 files changed, 4 insertions(+) diff --git a/ANNOUNCE b/ANNOUNCE index 10aa46aba..95d5794ac 100644 --- a/ANNOUNCE +++ b/ANNOUNCE @@ -26,6 +26,7 @@ Other information: Changes since the last public release (1.6.13): Version 1.6.14beta01 [August 21, 2014] + Guard usage of png_ptr->options with #ifdef PNG_SET_OPTION_SUPPORTED. Send comments/corrections/commendations to png-mng-implement at lists.sf.net (subscription required; visit diff --git a/CHANGES b/CHANGES index fa0d3de0e..478db1052 100644 --- a/CHANGES +++ b/CHANGES @@ -4979,6 +4979,7 @@ Version 1.6.13 [August 21, 2014] No changes. Version 1.6.14beta01 [August 21, 2014] + Guard usage of png_ptr->options with #ifdef PNG_SET_OPTION_SUPPORTED. Send comments/corrections/commendations to png-mng-implement at lists.sf.net (subscription required; visit diff --git a/png.c b/png.c index e4ce4fd0e..83a01aaa4 100644 --- a/png.c +++ b/png.c @@ -2219,10 +2219,12 @@ png_compare_ICC_profile_with_sRGB(png_const_structrp png_ptr, #endif unsigned int i; +#ifdef PNG_SET_OPTION_SUPPORTED /* First see if PNG_SKIP_sRGB_CHECK_PROFILE has been set to "on" */ if (((png_ptr->options >> PNG_SKIP_sRGB_CHECK_PROFILE) & 3) == PNG_OPTION_ON) return 0; +#endif for (i=0; i < (sizeof png_sRGB_checks) / (sizeof png_sRGB_checks[0]); ++i) {