[libpng16] Guard usage of png_ptr->options with #ifdef PNG_SET_OPTION_SUPPORTED.

This commit is contained in:
Glenn Randers-Pehrson 2014-08-22 08:55:50 -05:00
parent bcd3209a42
commit 3669467347
3 changed files with 4 additions and 0 deletions

View File

@ -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

View File

@ -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

2
png.c
View File

@ -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)
{