[libpng17] Improved some overflow handling. PNG_RELEASE_BUILD replaces tests

where the code depended on the build base type and can be defined on
the command line, allowing testing in beta builds.  Overflows previously
handled by png_warning in png.c have been changed to use new
macros/affirm functions so that beta builds will abort on overflow and
release builds will quietly ignore it.  This avoids release builds
producing warnings that are of no use to end users.
This commit is contained in:
John Bowler
2015-03-22 16:05:56 -05:00
committed by Glenn Randers-Pehrson
parent 82fa6aed0e
commit 36562c1032
9 changed files with 302 additions and 111 deletions

View File

@@ -544,7 +544,7 @@ png_create_write_struct_2,(png_const_charp user_png_ver, png_voidp error_ptr,
/* App warnings are warnings in release (or release candidate) builds but
* are errors during development.
*/
#if PNG_LIBPNG_BUILD_BASE_TYPE >= PNG_LIBPNG_BUILD_RC
#if PNG_RELEASE_BUILD
png_ptr->flags |= PNG_FLAG_APP_WARNINGS_WARN;
#endif