[libpng17] Relocated misplaced #endif in png.c sRGB profile checking.

This commit is contained in:
Glenn Randers-Pehrson 2016-07-02 21:33:25 -05:00
parent b9d7d5525b
commit 4b846be113
3 changed files with 9 additions and 9 deletions

View File

@ -1,5 +1,5 @@
Libpng 1.7.0beta82 - July 2, 2016
Libpng 1.7.0beta82 - July 3, 2016
This is not intended to be a public release. It will be replaced
within a few weeks by a public version or by another test version.
@ -1380,13 +1380,14 @@ Version 1.7.0beta81 [June 11, 2016]
Avoid potential overflow of the PNG_IMAGE_SIZE macro. This macro
is not used within libpng, but is used in some of the examples.
Version 1.7.0beta82 [July 2, 2016]
Version 1.7.0beta82 [July 3, 2016]
Put the SKIP definition in the correct place. It needs to come after the
png.h include (see all the other .c files in contrib/libtests) because it
depends on PNG_LIBPNG_VER.
Moved pngcp to contrib/tools and added pngcp to the build together
with a pngcp.dfa configuration test (John Bowler)
Added a "Common linking failures" section to the INSTALL document.
Relocated misplaced #endif in png.c sRGB profile checking.
Send comments/corrections/commendations to png-mng-implement at lists.sf.net
(subscription required; visit

View File

@ -5680,13 +5680,14 @@ Version 1.7.0beta81 [June 11, 2016]
Avoid potential overflow of the PNG_IMAGE_SIZE macro. This macro
is not used within libpng, but is used in some of the examples.
Version 1.7.0beta82 [July 2, 2016]
Version 1.7.0beta82 [July 3, 2016]
Put the SKIP definition in the correct place. It needs to come after the
png.h include (see all the other .c files in contrib/libtests) because it
depends on PNG_LIBPNG_VER.
Moved pngcp to contrib/tools and added pngcp to the build together
with a pngcp.dfa configuration test (John Bowler)
Added a "Common linking failures" section to the INSTALL document.
Relocated misplaced #endif in png.c sRGB profile checking.
Send comments/corrections/commendations to png-mng-implement at lists.sf.net
(subscription required; visit

10
png.c
View File

@ -704,14 +704,14 @@ png_get_copyright(png_const_structrp png_ptr)
#else
# ifdef __STDC__
return PNG_STRING_NEWLINE \
"libpng version 1.7.0beta82 - June 11, 2016" PNG_STRING_NEWLINE \
"libpng version 1.7.0beta82 - July 3, 2016" PNG_STRING_NEWLINE \
"Copyright (c) 1998-2002,2004,2006-2016 Glenn Randers-Pehrson" \
PNG_STRING_NEWLINE \
"Copyright (c) 1996-1997 Andreas Dilger" PNG_STRING_NEWLINE \
"Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc." \
PNG_STRING_NEWLINE;
# else
return "libpng version 1.7.0beta82 - June 11, 2016\
return "libpng version 1.7.0beta82 - July 3, 2016\
Copyright (c) 1998-2002,2004,2006-2016 Glenn Randers-Pehrson\
Copyright (c) 1996-1997 Andreas Dilger\
Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc.";
@ -2291,7 +2291,6 @@ png_compare_ICC_profile_with_sRGB(png_const_structrp png_ptr,
return 0; /* no match */
}
#endif /* PNG_sRGB_PROFILE_CHECKS >= 0 */
void /* PRIVATE */
png_icc_set_sRGB(png_const_structrp png_ptr,
@ -2300,12 +2299,11 @@ png_icc_set_sRGB(png_const_structrp png_ptr,
/* Is this profile one of the known ICC sRGB profiles? If it is, just set
* the sRGB information.
*/
#if PNG_sRGB_PROFILE_CHECKS >= 0
if (png_compare_ICC_profile_with_sRGB(png_ptr, profile, adler) != 0)
#endif
(void)png_colorspace_set_sRGB(png_ptr, colorspace,
(int)/*already checked*/png_get_uint_32(profile+64));
}
#endif /* PNG_sRGB_PROFILE_CHECKS >= 0 */
#endif /* sRGB */
int /* PRIVATE */
@ -2322,7 +2320,7 @@ png_colorspace_set_ICC(png_const_structrp png_ptr, png_colorspacerp colorspace,
png_icc_check_tag_table(png_ptr, colorspace, name, profile_length,
profile) != 0)
{
# ifdef PNG_sRGB_SUPPORTED
# if defined(PNG_sRGB_SUPPORTED) && PNG_sRGB_PROFILE_CHECKS >= 0
/* If no sRGB support, don't try storing sRGB information */
png_icc_set_sRGB(png_ptr, colorspace, profile, 0);
# endif