[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

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