From 37869ef337c30e7dabab5cb596f89ea4ad37c318 Mon Sep 17 00:00:00 2001 From: Akira Kakuto Date: Fri, 15 Jan 2016 23:53:35 +0000 Subject: linpng 1.6.21 git-svn-id: svn://tug.org/texlive/trunk@39398 c570f23f-e606-0410-a88d-b1316a301751 --- Build/source/libs/README | 2 +- Build/source/libs/libpng/ChangeLog | 5 + Build/source/libs/libpng/README | 3 +- Build/source/libs/libpng/configure | 20 +- .../libs/libpng/libpng-src-PATCHES/TL-Changes | 4 +- Build/source/libs/libpng/libpng-src/ANNOUNCE | 66 ++--- Build/source/libs/libpng/libpng-src/CHANGES | 40 +++- Build/source/libs/libpng/libpng-src/CMakeLists.txt | 4 +- Build/source/libs/libpng/libpng-src/LICENSE | 6 +- Build/source/libs/libpng/libpng-src/README | 2 +- Build/source/libs/libpng/libpng-src/configure.ac | 6 +- .../libpng/libpng-src/contrib/libtests/makepng.c | 2 +- .../libpng/libpng-src/contrib/libtests/pngstest.c | 2 +- .../libpng/libpng-src/contrib/libtests/pngvalid.c | 266 +++++++++++++++------ .../libs/libpng/libpng-src/contrib/tools/pngfix.c | 10 +- .../libs/libpng/libpng-src/libpng-manual.txt | 14 +- Build/source/libs/libpng/libpng-src/libpng.3 | 28 ++- Build/source/libs/libpng/libpng-src/libpngpf.3 | 4 +- Build/source/libs/libpng/libpng-src/png.5 | 2 +- Build/source/libs/libpng/libpng-src/png.c | 13 +- Build/source/libs/libpng/libpng-src/png.h | 26 +- Build/source/libs/libpng/libpng-src/pngconf.h | 4 +- Build/source/libs/libpng/libpng-src/pngdebug.h | 2 +- Build/source/libs/libpng/libpng-src/pngerror.c | 2 +- Build/source/libs/libpng/libpng-src/pngget.c | 2 +- Build/source/libs/libpng/libpng-src/pnginfo.h | 2 +- Build/source/libs/libpng/libpng-src/pnglibconf.h | 4 +- Build/source/libs/libpng/libpng-src/pngmem.c | 2 +- Build/source/libs/libpng/libpng-src/pngpread.c | 2 +- Build/source/libs/libpng/libpng-src/pngpriv.h | 7 +- Build/source/libs/libpng/libpng-src/pngread.c | 2 +- Build/source/libs/libpng/libpng-src/pngrio.c | 2 +- Build/source/libs/libpng/libpng-src/pngrtran.c | 2 +- Build/source/libs/libpng/libpng-src/pngrutil.c | 4 +- Build/source/libs/libpng/libpng-src/pngset.c | 86 ++++++- Build/source/libs/libpng/libpng-src/pngstruct.h | 2 +- Build/source/libs/libpng/libpng-src/pngtest.c | 4 +- Build/source/libs/libpng/libpng-src/pngtrans.c | 2 +- Build/source/libs/libpng/libpng-src/pngwio.c | 2 +- Build/source/libs/libpng/libpng-src/pngwrite.c | 2 +- Build/source/libs/libpng/libpng-src/pngwtran.c | 2 +- Build/source/libs/libpng/libpng-src/pngwutil.c | 88 +------ .../libpng/libpng-src/projects/vstudio/WARNING | 27 --- .../libpng/libpng-src/projects/vstudio/readme.txt | 44 +++- .../libpng/libpng-src/projects/vstudio/zlib.props | 2 +- .../libs/libpng/libpng-src/scripts/README.txt | 10 +- Build/source/libs/libpng/libpng-src/scripts/def.c | 2 +- .../libpng-src/scripts/libpng-config-head.in | 2 +- .../libs/libpng/libpng-src/scripts/libpng.pc.in | 2 +- .../libs/libpng/libpng-src/scripts/makefile.cegcc | 2 +- .../libs/libpng/libpng-src/scripts/makefile.linux | 2 +- .../libs/libpng/libpng-src/scripts/makefile.msys | 2 +- .../libpng/libpng-src/scripts/makefile.ne12bsd | 2 +- .../libs/libpng/libpng-src/scripts/makefile.netbsd | 2 +- .../libpng/libpng-src/scripts/makefile.openbsd | 2 +- .../libs/libpng/libpng-src/scripts/pnglibconf.dfa | 12 +- .../libpng-src/scripts/pnglibconf.h.prebuilt | 4 +- .../libs/libpng/libpng-src/scripts/symbols.def | 2 +- Build/source/libs/libpng/libpng-src/tests/pngstest | 4 +- Build/source/libs/libpng/version.ac | 2 +- 60 files changed, 525 insertions(+), 350 deletions(-) delete mode 100644 Build/source/libs/libpng/libpng-src/projects/vstudio/WARNING (limited to 'Build') diff --git a/Build/source/libs/README b/Build/source/libs/README index 4e1f474455c..342d6cb6356 100644 --- a/Build/source/libs/README +++ b/Build/source/libs/README @@ -33,7 +33,7 @@ icu 56.1 (release) - checked 8oct15 libpaper 1.1.24+nmu2 - checked 24oct13 ftp://ftp.de.debian.org/debian/pool/main/libp/libpaper/ -libpng 1.6.20 - checked 28dec15 +libpng 1.6.21 - checked 15jan16 http://www.libpng.org/ - used by many http://www.libpng.org/pub/png/pngcode.html diff --git a/Build/source/libs/libpng/ChangeLog b/Build/source/libs/libpng/ChangeLog index b7a87930005..466208698fb 100644 --- a/Build/source/libs/libpng/ChangeLog +++ b/Build/source/libs/libpng/ChangeLog @@ -1,3 +1,8 @@ +2016-01-15 Akira Kakuto + + Import libpng-1.6.21. + * version.ac: Adjust. + 2015-12-28 Akira Kakuto Import libpng-1.6.20. diff --git a/Build/source/libs/libpng/README b/Build/source/libs/libpng/README index 06051646a7d..f3124022a7d 100644 --- a/Build/source/libs/libpng/README +++ b/Build/source/libs/libpng/README @@ -1,4 +1,4 @@ - Building libpng-1.6.20 as part of the TL tree + Building libpng-1.6.21 as part of the TL tree ============================================= This directory libs/libpng/ uses a proxy Makefile.am to build the libpng library @@ -15,3 +15,4 @@ copied to libs/libpng/configure.ac. 2009-07-23 Peter Breitenlohner 2015-12-28 Akira Kakuto +2016-01-15 Akira Kakuto diff --git a/Build/source/libs/libpng/configure b/Build/source/libs/libpng/configure index 21e1458bfd3..58d5f32c791 100755 --- a/Build/source/libs/libpng/configure +++ b/Build/source/libs/libpng/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for libpng (TeX Live) 1.6.20. +# Generated by GNU Autoconf 2.69 for libpng (TeX Live) 1.6.21. # # Report bugs to . # @@ -580,8 +580,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='libpng (TeX Live)' PACKAGE_TARNAME='libpng--tex-live-' -PACKAGE_VERSION='1.6.20' -PACKAGE_STRING='libpng (TeX Live) 1.6.20' +PACKAGE_VERSION='1.6.21' +PACKAGE_STRING='libpng (TeX Live) 1.6.21' PACKAGE_BUGREPORT='tex-k@tug.org' PACKAGE_URL='' @@ -1287,7 +1287,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures libpng (TeX Live) 1.6.20 to adapt to many kinds of systems. +\`configure' configures libpng (TeX Live) 1.6.21 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1354,7 +1354,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of libpng (TeX Live) 1.6.20:";; + short | recursive ) echo "Configuration of libpng (TeX Live) 1.6.21:";; esac cat <<\_ACEOF @@ -1459,7 +1459,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -libpng (TeX Live) configure 1.6.20 +libpng (TeX Live) configure 1.6.21 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -1882,7 +1882,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by libpng (TeX Live) $as_me 1.6.20, which was +It was created by libpng (TeX Live) $as_me 1.6.21, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -3805,7 +3805,7 @@ fi # Define the identity of the package. PACKAGE='libpng--tex-live-' - VERSION='1.6.20' + VERSION='1.6.21' cat >>confdefs.h <<_ACEOF @@ -6325,7 +6325,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by libpng (TeX Live) $as_me 1.6.20, which was +This file was extended by libpng (TeX Live) $as_me 1.6.21, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -6391,7 +6391,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -libpng (TeX Live) config.status 1.6.20 +libpng (TeX Live) config.status 1.6.21 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" diff --git a/Build/source/libs/libpng/libpng-src-PATCHES/TL-Changes b/Build/source/libs/libpng/libpng-src-PATCHES/TL-Changes index f149a3e3e9c..208d332de49 100644 --- a/Build/source/libs/libpng/libpng-src-PATCHES/TL-Changes +++ b/Build/source/libs/libpng/libpng-src-PATCHES/TL-Changes @@ -1,5 +1,5 @@ -Changes applied to the libpng-1.6.20/ tree as obtained from: - http://www.libpng.org/ libpng-1.6.20.tar.xz +Changes applied to the libpng-1.6.21/ tree as obtained from: + http://www.libpng.org/ libpng-1.6.21.tar.xz Copied: scripts/pnglibconf.h.prebuilt -> pnglibconf.h diff --git a/Build/source/libs/libpng/libpng-src/ANNOUNCE b/Build/source/libs/libpng/libpng-src/ANNOUNCE index 4dae783b559..5de4eed0999 100644 --- a/Build/source/libs/libpng/libpng-src/ANNOUNCE +++ b/Build/source/libs/libpng/libpng-src/ANNOUNCE @@ -1,4 +1,4 @@ -Libpng 1.6.20 - December 3, 2015 +Libpng 1.6.21 - January 15, 2016 This is a public release of libpng, intended for use in production codes. @@ -7,41 +7,49 @@ Files available for download: Source files with LF line endings (for Unix/Linux) and with a "configure" script - libpng-1.6.20.tar.xz (LZMA-compressed, recommended) - libpng-1.6.20.tar.gz + libpng-1.6.21.tar.xz (LZMA-compressed, recommended) + libpng-1.6.21.tar.gz Source files with CRLF line endings (for Windows), without the "configure" script - /scratch/glennrp/Libpng16/lpng1620.7z (LZMA-compressed, recommended) - /scratch/glennrp/Libpng16/lpng1620.zip + /scratch/glennrp/Libpng16/lpng1621.7z (LZMA-compressed, recommended) + /scratch/glennrp/Libpng16/lpng1621.zip Other information: - libpng-1.6.20-README.txt - libpng-1.6.20-LICENSE.txt - libpng-1.6.20-*.asc (armored detached GPG signatures) - -Changes since the last public release (1.6.19): - Avoid potential pointer overflow/underflow in png_handle_sPLT() and - png_handle_pCAL() (Bug report by John Regehr). - Fixed incorrect implementation of png_set_PLTE() that uses png_ptr - not info_ptr, that left png_set_PLTE() open to the CVE-2015-8126 - vulnerability. - Backported tests from libpng-1.7.0beta69. - Fixed an error in handling of bad zlib CMINFO field in pngfix, found by - American Fuzzy Lop, reported by Brian Carpenter. inflate() doesn't - immediately fault a bad CMINFO field; instead a 'too far back' error - happens later (at least some times). pngfix failed to limit CMINFO to - the allowed values but then assumed that window_bits was in range, - triggering an assert. The bug is mostly harmless; the PNG file cannot - be fixed. - In libpng 1.6 zlib initialization was changed to use the window size - in the zlib stream, not a fixed value. This causes some invalid images, - where CINFO is too large, to display 'correctly' if the rest of the - data is valid. This provides a workaround for zlib versions where the - error arises (ones that support the API change to use the window size - in the stream). + libpng-1.6.21-README.txt + libpng-1.6.21-LICENSE.txt + libpng-1.6.21-*.asc (armored detached GPG signatures) + +Changes since the last public release (1.6.20): + + Fixed syntax "$(command)" in tests/pngstest that some shells other than + bash could not parse (Bug report by Nelson Beebe). Use `command` instead. + Moved png_check_keyword() from pngwutil.c to pngset.c + Removed LE/BE dependencies in pngvalid, to 'fix' the current problem + in the BigEndian tests by not testing it, making the BE code the same + as the LE version. + Fixes to pngvalid for various reduced build configurations (eliminate unused + statics) and a fix for the case in rgb_to_gray when the digitize option + reduces graylo to 0, producing a large error. + Widened the 'limit' check on the internally calculated error limits in + the 'DIGITIZE' case (the code used prior to 1.7 for rgb_to_gray error + checks) and changed the check to only operate in non-release builds + (base build type not RC or RELEASE.) + Fixed undefined behavior in pngvalid.c, undefined because + (png_byte) << shift is undefined if it changes the signed bit + (because png_byte is promoted to int). The libpng exported functions + png_get_uint_32 and png_get_uint_16 handle this. (Bug reported by + David Drysdale as a result of reports from UBSAN in clang 3.8). + This changes pngvalid to use BE random numbers; this used to produce + errors but these should not be fixed as a result of the previous changes. + In projects/vstudio, combined readme.txt and WARNING into README.txt + Relocated assert() in contrib/tools/pngfix.c, bug found by American + Fuzzy Lop, reported by Brian Carpenter. + Marked 'limit' UNUSED in transform_range_check(). This only affects + release builds. + Worked around a false-positive Coverity issue in pngvalid.c. Send comments/corrections/commendations to png-mng-implement at lists.sf.net (subscription required; visit diff --git a/Build/source/libs/libpng/libpng-src/CHANGES b/Build/source/libs/libpng/libpng-src/CHANGES index 28094fd26cb..8e589f64c5f 100644 --- a/Build/source/libs/libpng/libpng-src/CHANGES +++ b/Build/source/libs/libpng/libpng-src/CHANGES @@ -5421,7 +5421,7 @@ Version 1.6.20beta01 [November 20, 2015] Version 1.6.20beta02 [November 23, 2015] Fixed incorrect implementation of png_set_PLTE() that uses png_ptr not info_ptr, that left png_set_PLTE() open to the CVE-2015-8126 - vulnerability. + vulnerability. Fixes CVE-2015-8472. Version 1.6.20beta03 [November 24, 2015] Backported tests from libpng-1.7.0beta69. @@ -5446,6 +5446,44 @@ Version 1.6.20rc02 [November 29, 2015] Version 1.6.20 [December 3, 2015] No changes. +Version 1.6.21beta01 [December 11, 2015] + Fixed syntax "$(command)" in tests/pngstest that some shells other than + bash could not parse (Bug report by Nelson Beebe). Use `command` instead. + +Version 1.6.21beta02 [December 14, 2015] + Moved png_check_keyword() from pngwutil.c to pngset.c + Removed LE/BE dependencies in pngvalid, to 'fix' the current problem + in the BigEndian tests by not testing it, making the BE code the same + as the LE version. + Fixes to pngvalid for various reduced build configurations (eliminate unused + statics) and a fix for the case in rgb_to_gray when the digitize option + reduces graylo to 0, producing a large error. + +Version 1.6.21beta03 [December 18, 2015] + Widened the 'limit' check on the internally calculated error limits in + the 'DIGITIZE' case (the code used prior to 1.7 for rgb_to_gray error + checks) and changed the check to only operate in non-release builds + (base build type not RC or RELEASE.) + Fixed undefined behavior in pngvalid.c, undefined because + (png_byte) << shift is undefined if it changes the signed bit + (because png_byte is promoted to int). The libpng exported functions + png_get_uint_32 and png_get_uint_16 handle this. (Bug reported by + David Drysdale as a result of reports from UBSAN in clang 3.8). + This changes pngvalid to use BE random numbers; this used to produce + errors but these should not be fixed as a result of the previous changes. + +Version 1.6.21rc01 [January 4, 2016] + In projects/vstudio, combined readme.txt and WARNING into README.txt + +Version 1.6.21rc02 [January 7, 2016] + Relocated assert() in contrib/tools/pngfix.c, bug found by American + Fuzzy Lop, reported by Brian Carpenter. + Marked 'limit' UNUSED in transform_range_check(). This only affects + release builds. + +Version 1.6.21 [January 15, 2016] + Worked around a false-positive Coverity issue in pngvalid.c. + Send comments/corrections/commendations to png-mng-implement at lists.sf.net (subscription required; visit https://lists.sourceforge.net/lists/listinfo/png-mng-implement diff --git a/Build/source/libs/libpng/libpng-src/CMakeLists.txt b/Build/source/libs/libpng/libpng-src/CMakeLists.txt index 7bc49c5b7cb..2f180b559cc 100644 --- a/Build/source/libs/libpng/libpng-src/CMakeLists.txt +++ b/Build/source/libs/libpng/libpng-src/CMakeLists.txt @@ -16,7 +16,7 @@ enable_testing() set(PNGLIB_MAJOR 1) set(PNGLIB_MINOR 6) -set(PNGLIB_RELEASE 20) +set(PNGLIB_RELEASE 21) set(PNGLIB_NAME libpng${PNGLIB_MAJOR}${PNGLIB_MINOR}) set(PNGLIB_VERSION ${PNGLIB_MAJOR}.${PNGLIB_MINOR}.${PNGLIB_RELEASE}) @@ -261,7 +261,7 @@ endif(NOT WIN32 OR CYGWIN OR MINGW) # SET UP LINKS if(PNG_SHARED) set_target_properties(${PNG_LIB_NAME} PROPERTIES -# VERSION 16.${PNGLIB_RELEASE}.1.6.20 +# VERSION 16.${PNGLIB_RELEASE}.1.6.21 VERSION 16.${PNGLIB_RELEASE}.0 SOVERSION 16 CLEAN_DIRECT_OUTPUT 1) diff --git a/Build/source/libs/libpng/libpng-src/LICENSE b/Build/source/libs/libpng/libpng-src/LICENSE index 82dbe117f6d..fd93b1b4112 100644 --- a/Build/source/libs/libpng/libpng-src/LICENSE +++ b/Build/source/libs/libpng/libpng-src/LICENSE @@ -10,8 +10,8 @@ this sentence. This code is released under the libpng license. -libpng versions 1.0.7, July 1, 2000, through 1.6.20, December 3, 2015, are -Copyright (c) 2000-2002, 2004, 2006-2015 Glenn Randers-Pehrson, are +libpng versions 1.0.7, July 1, 2000, through 1.6.21, January 15, 2016, are +Copyright (c) 2000-2002, 2004, 2006-2016 Glenn Randers-Pehrson, are derived from libpng-1.0.6, and are distributed according to the same disclaimer and license as libpng-1.0.6 with the following individuals added to the list of Contributing Authors: @@ -109,4 +109,4 @@ the additional disclaimers inserted at version 1.0.7. Glenn Randers-Pehrson glennrp at users.sourceforge.net -December 3, 2015 +January 15, 2016 diff --git a/Build/source/libs/libpng/libpng-src/README b/Build/source/libs/libpng/libpng-src/README index 59f1f918ae2..176928fbc98 100644 --- a/Build/source/libs/libpng/libpng-src/README +++ b/Build/source/libs/libpng/libpng-src/README @@ -1,4 +1,4 @@ -README for libpng version 1.6.20 - December 3, 2015 (shared library 16.0) +README for libpng version 1.6.21 - January 15, 2016 (shared library 16.0) See the note about version numbers near the top of png.h See INSTALL for instructions on how to install libpng. diff --git a/Build/source/libs/libpng/libpng-src/configure.ac b/Build/source/libs/libpng/libpng-src/configure.ac index 845ae1c354b..8af866d266c 100644 --- a/Build/source/libs/libpng/libpng-src/configure.ac +++ b/Build/source/libs/libpng/libpng-src/configure.ac @@ -18,7 +18,7 @@ AC_PREREQ([2.68]) dnl Version number stuff here: -AC_INIT([libpng],[1.6.20],[png-mng-implement@lists.sourceforge.net]) +AC_INIT([libpng],[1.6.21],[png-mng-implement@lists.sourceforge.net]) AC_CONFIG_MACRO_DIR([scripts]) # libpng does not follow GNU file name conventions (hence 'foreign') @@ -39,10 +39,10 @@ dnl automake, so the following is not necessary (and is not defined anyway): dnl AM_PREREQ([1.11.2]) dnl stop configure from automagically running automake -PNGLIB_VERSION=1.6.20 +PNGLIB_VERSION=1.6.21 PNGLIB_MAJOR=1 PNGLIB_MINOR=6 -PNGLIB_RELEASE=20 +PNGLIB_RELEASE=21 dnl End of version number stuff diff --git a/Build/source/libs/libpng/libpng-src/contrib/libtests/makepng.c b/Build/source/libs/libpng/libpng-src/contrib/libtests/makepng.c index 60d96d198dc..9dff0484605 100644 --- a/Build/source/libs/libpng/libpng-src/contrib/libtests/makepng.c +++ b/Build/source/libs/libpng/libpng-src/contrib/libtests/makepng.c @@ -3,7 +3,7 @@ /* Copyright: */ #define COPYRIGHT "\251 2013,2015 John Cunningham Bowler" /* - * Last changed in libpng 1.7.0 [(PENDING RELEASE)] + * Last changed in libpng 1.6.20 [November 24, 2015] * * This code is released under the libpng license. * For conditions of distribution and use, see the disclaimer diff --git a/Build/source/libs/libpng/libpng-src/contrib/libtests/pngstest.c b/Build/source/libs/libpng/libpng-src/contrib/libtests/pngstest.c index 3374c7202fa..0febb63a115 100644 --- a/Build/source/libs/libpng/libpng-src/contrib/libtests/pngstest.c +++ b/Build/source/libs/libpng/libpng-src/contrib/libtests/pngstest.c @@ -3,7 +3,7 @@ * * Copyright (c) 2013-2015 John Cunningham Bowler * - * Last changed in libpng 1.6.19 [(PENDING RELEASE)] + * Last changed in libpng 1.6.19 [November 12, 2015] * * This code is released under the libpng license. * For conditions of distribution and use, see the disclaimer diff --git a/Build/source/libs/libpng/libpng-src/contrib/libtests/pngvalid.c b/Build/source/libs/libpng/libpng-src/contrib/libtests/pngvalid.c index bdd3c9188d6..55d094592a4 100644 --- a/Build/source/libs/libpng/libpng-src/contrib/libtests/pngvalid.c +++ b/Build/source/libs/libpng/libpng-src/contrib/libtests/pngvalid.c @@ -1,8 +1,8 @@ /* pngvalid.c - validate libpng by constructing then reading png files. * - * Last changed in libpng 1.5.25 [December 3, 2015] - * Copyright (c) 2014-2015 Glenn Randers-Pehrson + * Last changed in libpng 1.6.21 [January 15, 2016] + * Copyright (c) 2014-2016 Glenn Randers-Pehrson * Written by John Cunningham Bowler * * This code is released under the libpng license. @@ -116,6 +116,16 @@ typedef png_byte *png_const_bytep; # define png_const_structp png_structp #endif +#ifndef RELEASE_BUILD + /* RELEASE_BUILD is true for releases and release candidates: */ +# define RELEASE_BUILD (PNG_LIBPNG_BUILD_BASE_TYPE >= PNG_LIBPNG_BUILD_RC) +#endif +#if RELEASE_BUILD +# define debugonly(something) +#else /* !RELEASE_BUILD */ +# define debugonly(something) something +#endif /* !RELEASE_BUILD */ + #include /* For floating point constants */ #include /* For malloc */ #include /* For memcpy, memset */ @@ -276,7 +286,8 @@ make_four_random_bytes(png_uint_32* seed, png_bytep bytes) make_random_bytes(seed, bytes, 4); } -#if defined PNG_READ_SUPPORTED || defined PNG_WRITE_tRNS_SUPPORTED +#if defined PNG_READ_SUPPORTED || defined PNG_WRITE_tRNS_SUPPORTED ||\ + defined PNG_WRITE_FILTER_SUPPORTED static void randomize(void *pv, size_t size) { @@ -284,19 +295,66 @@ randomize(void *pv, size_t size) make_random_bytes(random_seed, pv, size); } -#define RANDOMIZE(this) randomize(&(this), sizeof (this)) -#endif /* READ || WRITE_tRNS */ +#define R8(this) randomize(&(this), sizeof (this)) -#ifdef PNG_READ_TRANSFORMS_SUPPORTED +static void r16(png_uint_16p p16, size_t count) +{ + size_t i; + + for (i=0; i= PNG_FILTER_VALUE_LAST ? PNG_ALL_FILTERS : nfilter); + { + int filters = 8 << random_mod(PNG_FILTER_VALUE_LAST); + + if (pass == 0 && y == 0 && + (filters < PNG_FILTER_UP || w == 1U)) + filters |= PNG_FILTER_UP; - if (nfilter-- == 0) - nfilter = PNG_FILTER_VALUE_LAST-1; + png_set_filter(pp, 0/*method*/, filters); + } # endif png_write_row(pp, row); @@ -4244,62 +4333,71 @@ make_error(png_store* const ps, png_byte const colour_type, #undef exception__env /* And clear these flags */ - ps->expect_error = 0; ps->expect_warning = 0; - /* Now write the whole image, just to make sure that the detected, or - * undetected, errro has not created problems inside libpng. - */ - if (png_get_rowbytes(pp, pi) != - transform_rowsize(pp, colour_type, bit_depth)) - png_error(pp, "row size incorrect"); + if (ps->expect_error) + ps->expect_error = 0; else { - int npasses = set_write_interlace_handling(pp, interlace_type); - int pass; - - if (npasses != npasses_from_interlace_type(pp, interlace_type)) - png_error(pp, "write: png_set_interlace_handling failed"); + /* Now write the whole image, just to make sure that the detected, or + * undetected, errro has not created problems inside libpng. This + * doesn't work if there was a png_error in png_write_info because that + * can abort before PLTE was written. + */ + if (png_get_rowbytes(pp, pi) != + transform_rowsize(pp, colour_type, bit_depth)) + png_error(pp, "row size incorrect"); - for (pass=0; pass 0) - interlace_row(buffer, buffer, - bit_size(pp, colour_type, bit_depth), w, pass, - 0/*data always bigendian*/); - else - continue; - } -# endif /* do_own_interlace */ + if (interlace_type == PNG_INTERLACE_ADAM7) + { + /* The row must not be written if it doesn't exist, + * notice that there are two conditions here, either the + * row isn't ever in the pass or the row would be but + * isn't wide enough to contribute any pixels. In fact + * the wPass test can be used to skip the whole y loop + * in this case. + */ + if (PNG_ROW_IN_INTERLACE_PASS(y, pass) && + PNG_PASS_COLS(w, pass) > 0) + interlace_row(buffer, buffer, + bit_size(pp, colour_type, bit_depth), w, pass, + 0/*data always bigendian*/); + else + continue; + } +# endif /* do_own_interlace */ - png_write_row(pp, buffer); + png_write_row(pp, buffer); + } } - } - } + } /* image writing */ - png_write_end(pp, pi); + png_write_end(pp, pi); + } /* The following deletes the file that was just written. */ store_write_reset(ps); @@ -6257,7 +6355,7 @@ transform_range_check(png_const_structp pp, unsigned int r, unsigned int g, unsigned int max = (1U< limit || !(out >= in_min && out <= in_max)) + if (debugonly(err > limit ||) !(out >= in_min && out <= in_max)) { char message[256]; size_t pos; @@ -6283,6 +6381,8 @@ transform_range_check(png_const_structp pp, unsigned int r, unsigned int g, png_error(pp, message); } + + UNUSED(limit) } static void @@ -7213,7 +7313,7 @@ image_transform_png_set_rgb_to_gray_ini(const image_transform *this, png_uint_32 ru; double total; - RANDOMIZE(ru); + R32(ru); data.green_coefficient = total = (ru & 0xffff) / 65535.; ru >>= 16; data.red_coefficient = (1 - total) * (ru & 0xffff) / 65535.; @@ -7274,14 +7374,12 @@ image_transform_png_set_rgb_to_gray_ini(const image_transform *this, * When DIGITIZE is set because a pre-1.7 version of libpng is being * tested allow a bigger slack. * - * NOTE: this magic number was determined by experiment to be about - * 1.263. There's no great merit to the value below, however it only - * affects the limit used for checking for internal calculation errors, - * not the actual limit imposed by pngvalid on the output errors. + * NOTE: this number only affects the internal limit check in pngvalid, + * it has no effect on the limits applied to the libpng values. */ that->pm->limit += pow( # if DIGITIZE - 1.3 + 2.0 # else 1.0 # endif @@ -7443,7 +7541,7 @@ image_transform_png_set_rgb_to_gray_mod(const image_transform *this, /* Image now has RGB channels... */ # if DIGITIZE { - const png_modifier *pm = display->pm; + png_modifier *pm = display->pm; const unsigned int sample_depth = that->sample_depth; const unsigned int calc_depth = (pm->assume_16_bit_calculations ? 16 : sample_depth); @@ -7592,9 +7690,11 @@ image_transform_png_set_rgb_to_gray_mod(const image_transform *this, else { err = fabs(grayhi-gray); + if (fabs(gray - graylo) > err) err = fabs(graylo-gray); +#if !RELEASE_BUILD /* Check that this worked: */ if (err > pm->limit) { @@ -7605,11 +7705,13 @@ image_transform_png_set_rgb_to_gray_mod(const image_transform *this, pos = safecatd(buffer, sizeof buffer, pos, err, 6); pos = safecat(buffer, sizeof buffer, pos, " exceeds limit "); pos = safecatd(buffer, sizeof buffer, pos, pm->limit, 6); - png_error(pp, buffer); + png_warning(pp, buffer); + pm->limit = err; } +#endif /* !RELEASE_BUILD */ } } -# else /* DIGITIZE */ +# else /* !DIGITIZE */ { double r = that->redf; double re = that->rede; @@ -7668,7 +7770,7 @@ image_transform_png_set_rgb_to_gray_mod(const image_transform *this, * lookups in the calculation and each introduces a quantization * error defined by the table size. */ - const png_modifier *pm = display->pm; + png_modifier *pm = display->pm; double in_qe = (that->sample_depth > 8 ? .5/65535 : .5/255); double out_qe = (that->sample_depth > 8 ? .5/65535 : (pm->assume_16_bit_calculations ? .5/(1<max_gamma_8) : @@ -7718,6 +7820,7 @@ image_transform_png_set_rgb_to_gray_mod(const image_transform *this, else err -= in_qe; +#if !RELEASE_BUILD /* Validate that the error is within limits (this has caused * problems before, it's much easier to detect them here.) */ @@ -7730,8 +7833,10 @@ image_transform_png_set_rgb_to_gray_mod(const image_transform *this, pos = safecatd(buffer, sizeof buffer, pos, err, 6); pos = safecat(buffer, sizeof buffer, pos, " exceeds limit "); pos = safecatd(buffer, sizeof buffer, pos, pm->limit, 6); - png_error(pp, buffer); + png_warning(pp, buffer); + pm->limit = err; } +#endif /* !RELEASE_BUILD */ } } # endif /* !DIGITIZE */ @@ -7802,7 +7907,7 @@ image_transform_png_set_background_set(const image_transform *this, * so we need to know what that is! The background colour is stored in the * transform_display. */ - RANDOMIZE(random_bytes); + R8(random_bytes); /* Read the random value, for colour type 3 the background colour is actually * expressed as a 24bit rgb, not an index. @@ -7830,7 +7935,7 @@ image_transform_png_set_background_set(const image_transform *this, /* Extract the background colour from this image_pixel, but make sure the * unused fields of 'back' are garbage. */ - RANDOMIZE(back); + R8(back); if (colour_type & PNG_COLOR_MASK_COLOR) { @@ -8136,7 +8241,7 @@ image_transform_png_set_filler_set(const image_transform *this, * filler. The 'filler' value has all 32 bits set, but only bit_depth * will be used. At this point we don't know bit_depth. */ - RANDOMIZE(data.filler); + R32(data.filler); data.flags = random_choice(); png_set_filler(pp, data.filler, data.flags); @@ -8209,7 +8314,7 @@ image_transform_png_set_add_alpha_set(const image_transform *this, * filler. The 'filler' value has all 32 bits set, but only bit_depth * will be used. At this point we don't know bit_depth. */ - RANDOMIZE(data.filler); + R32(data.filler); data.flags = random_choice(); png_set_add_alpha(pp, data.filler, data.flags); @@ -11296,6 +11401,9 @@ int main(int argc, char **argv) else if (strcmp(*argv, "-w") == 0 || strcmp(*argv, "--strict") == 0) + pm.this.treat_warnings_as_errors = 1; /* NOTE: this is the default! */ + + else if (strcmp(*argv, "--nostrict") == 0) pm.this.treat_warnings_as_errors = 0; else if (strcmp(*argv, "--speed") == 0) diff --git a/Build/source/libs/libpng/libpng-src/contrib/tools/pngfix.c b/Build/source/libs/libpng/libpng-src/contrib/tools/pngfix.c index 7fde31c6ed1..b2043e3fbca 100644 --- a/Build/source/libs/libpng/libpng-src/contrib/tools/pngfix.c +++ b/Build/source/libs/libpng/libpng-src/contrib/tools/pngfix.c @@ -1,8 +1,8 @@ /* pngfix.c * - * Copyright (c) 2014-2015 John Cunningham Bowler + * Copyright (c) 2014-2016 John Cunningham Bowler * - * Last changed in libpng 1.6.20 [December 3, 2015] + * Last changed in libpng 1.6.21 [January 15, 2016] * * This code is released under the libpng license. * For conditions of distribution and use, see the disclaimer @@ -319,13 +319,13 @@ uarb_mult32(uarb acc, int a_digits, uarb num, int n_digits, png_uint_32 val) a_digits = uarb_mult_digit(acc, a_digits, num, n_digits, (png_uint_16)(val & 0xffff)); - /* Because n_digits and val are >0 the following must be true: */ - assert(a_digits > 0); - val >>= 16; if (val > 0) a_digits = uarb_mult_digit(acc+1, a_digits-1, num, n_digits, (png_uint_16)val) + 1; + + /* Because n_digits and val are >0 the following must be true: */ + assert(a_digits > 0); } return a_digits; diff --git a/Build/source/libs/libpng/libpng-src/libpng-manual.txt b/Build/source/libs/libpng/libpng-src/libpng-manual.txt index 87eeb2b5837..1e838bd7722 100644 --- a/Build/source/libs/libpng/libpng-src/libpng-manual.txt +++ b/Build/source/libs/libpng/libpng-src/libpng-manual.txt @@ -1,9 +1,9 @@ libpng-manual.txt - A description on how to use and modify libpng - libpng version 1.6.20 - December 3, 2015 + libpng version 1.6.21 - January 15, 2016 Updated and distributed by Glenn Randers-Pehrson - Copyright (c) 1998-2015 Glenn Randers-Pehrson + Copyright (c) 1998-2016 Glenn Randers-Pehrson This document is released under the libpng license. For conditions of distribution and use, see the disclaimer @@ -11,9 +11,9 @@ libpng-manual.txt - A description on how to use and modify libpng Based on: - libpng versions 0.97, January 1998, through 1.6.20 - December 3, 2015 + libpng versions 0.97, January 1998, through 1.6.21 - January 15, 2016 Updated and distributed by Glenn Randers-Pehrson - Copyright (c) 1998-2015 Glenn Randers-Pehrson + Copyright (c) 1998-2016 Glenn Randers-Pehrson libpng 1.0 beta 6 - version 0.96 - May 28, 1997 Updated and distributed by Andreas Dilger @@ -5078,6 +5078,10 @@ enforced. The sRGB chunk is allowed to appear in images with any color type and is interpreted by libpng to convey a one-tracer-curve gray profile or a three-tracer-curve RGB profile as appropriate. +Libpng 1.5.x erroneously used /MD for Debug DLL builds; if you used the debug +builds in your app and you changed your app to use /MD you will need to +change it back to /MDd for libpng 1.6.x. + Prior to libpng-1.6.0 a warning would be issued if the iTXt chunk contained an empty language field or an empty translated keyword. Both of these are allowed by the PNG specification, so these warnings are no longer issued. @@ -5324,7 +5328,7 @@ Since the PNG Development group is an ad-hoc body, we can't make an official declaration. This is your unofficial assurance that libpng from version 0.71 and -upward through 1.6.20 are Y2K compliant. It is my belief that earlier +upward through 1.6.21 are Y2K compliant. It is my belief that earlier versions were also Y2K compliant. Libpng only has two year fields. One is a 2-byte unsigned integer diff --git a/Build/source/libs/libpng/libpng-src/libpng.3 b/Build/source/libs/libpng/libpng-src/libpng.3 index 357d0ec5a8b..b1f0c93ea02 100644 --- a/Build/source/libs/libpng/libpng-src/libpng.3 +++ b/Build/source/libs/libpng/libpng-src/libpng.3 @@ -1,6 +1,6 @@ -.TH LIBPNG 3 "December 3, 2015" +.TH LIBPNG 3 "January 15, 2016" .SH NAME -libpng \- Portable Network Graphics (PNG) Reference Library 1.6.20 +libpng \- Portable Network Graphics (PNG) Reference Library 1.6.21 .SH SYNOPSIS \fB #include \fP @@ -508,10 +508,10 @@ Following is a copy of the libpng-manual.txt file that accompanies libpng. .SH LIBPNG.TXT libpng-manual.txt - A description on how to use and modify libpng - libpng version 1.6.20 - December 3, 2015 + libpng version 1.6.21 - January 15, 2016 Updated and distributed by Glenn Randers-Pehrson - Copyright (c) 1998-2015 Glenn Randers-Pehrson + Copyright (c) 1998-2016 Glenn Randers-Pehrson This document is released under the libpng license. For conditions of distribution and use, see the disclaimer @@ -519,9 +519,9 @@ libpng-manual.txt - A description on how to use and modify libpng Based on: - libpng versions 0.97, January 1998, through 1.6.20 - December 3, 2015 + libpng versions 0.97, January 1998, through 1.6.21 - January 15, 2016 Updated and distributed by Glenn Randers-Pehrson - Copyright (c) 1998-2015 Glenn Randers-Pehrson + Copyright (c) 1998-2016 Glenn Randers-Pehrson libpng 1.0 beta 6 - version 0.96 - May 28, 1997 Updated and distributed by Andreas Dilger @@ -5586,6 +5586,10 @@ enforced. The sRGB chunk is allowed to appear in images with any color type and is interpreted by libpng to convey a one-tracer-curve gray profile or a three-tracer-curve RGB profile as appropriate. +Libpng 1.5.x erroneously used /MD for Debug DLL builds; if you used the debug +builds in your app and you changed your app to use /MD you will need to +change it back to /MDd for libpng 1.6.x. + Prior to libpng-1.6.0 a warning would be issued if the iTXt chunk contained an empty language field or an empty translated keyword. Both of these are allowed by the PNG specification, so these warnings are no longer issued. @@ -5832,7 +5836,7 @@ Since the PNG Development group is an ad-hoc body, we can't make an official declaration. This is your unofficial assurance that libpng from version 0.71 and -upward through 1.6.20 are Y2K compliant. It is my belief that earlier +upward through 1.6.21 are Y2K compliant. It is my belief that earlier versions were also Y2K compliant. Libpng only has two year fields. One is a 2-byte unsigned integer @@ -5934,7 +5938,7 @@ the first widely used release: ... 1.5.23 15 10523 15.so.15.23[.0] ... - 1.6.20 16 10620 16.so.16.20[.0] + 1.6.21 16 10621 16.so.16.21[.0] Henceforth the source version will match the shared-library minor and patch numbers; the shared-library major version number will be @@ -5990,7 +5994,7 @@ possible without all of you. Thanks to Frank J. T. Wojcik for helping with the documentation. -Libpng version 1.6.20 - December 3, 2015: +Libpng version 1.6.21 - January 15, 2016: Initially created in 1995 by Guy Eric Schalnat, then of Group 42, Inc. Currently maintained by Glenn Randers-Pehrson (glennrp at users.sourceforge.net). @@ -6015,8 +6019,8 @@ this sentence. This code is released under the libpng license. -libpng versions 1.0.7, July 1, 2000, through 1.6.20, December 3, 2015, are -Copyright (c) 2000-2002, 2004, 2006-2015 Glenn Randers-Pehrson, are +libpng versions 1.0.7, July 1, 2000, through 1.6.21, January 15, 2016, are +Copyright (c) 2000-2002, 2004, 2006-2016 Glenn Randers-Pehrson, are derived from libpng-1.0.6, and are distributed according to the same disclaimer and license as libpng-1.0.6 with the following individuals added to the list of Contributing Authors: @@ -6114,7 +6118,7 @@ the additional disclaimers inserted at version 1.0.7. Glenn Randers-Pehrson glennrp at users.sourceforge.net -December 3, 2015 +January 15, 2016 .\" end of man page diff --git a/Build/source/libs/libpng/libpng-src/libpngpf.3 b/Build/source/libs/libpng/libpng-src/libpngpf.3 index 4da0843fcbf..a76a0c5ca92 100644 --- a/Build/source/libs/libpng/libpng-src/libpngpf.3 +++ b/Build/source/libs/libpng/libpng-src/libpngpf.3 @@ -1,6 +1,6 @@ -.TH LIBPNGPF 3 "December 3, 2015" +.TH LIBPNGPF 3 "January 15, 2016" .SH NAME -libpng \- Portable Network Graphics (PNG) Reference Library 1.6.20 +libpng \- Portable Network Graphics (PNG) Reference Library 1.6.21 (private functions) .SH SYNOPSIS \fB#include \fI"pngpriv.h" diff --git a/Build/source/libs/libpng/libpng-src/png.5 b/Build/source/libs/libpng/libpng-src/png.5 index 76a327ba68a..5a44ea62b68 100644 --- a/Build/source/libs/libpng/libpng-src/png.5 +++ b/Build/source/libs/libpng/libpng-src/png.5 @@ -1,4 +1,4 @@ -.TH PNG 5 "December 3, 2015" +.TH PNG 5 "January 15, 2016" .SH NAME png \- Portable Network Graphics (PNG) format .SH DESCRIPTION diff --git a/Build/source/libs/libpng/libpng-src/png.c b/Build/source/libs/libpng/libpng-src/png.c index c183e3f8faf..1d1bde58897 100644 --- a/Build/source/libs/libpng/libpng-src/png.c +++ b/Build/source/libs/libpng/libpng-src/png.c @@ -2,7 +2,7 @@ /* png.c - location for general purpose libpng functions * * Last changed in libpng 1.6.19 [November 12, 2015] - * Copyright (c) 1998-2015 Glenn Randers-Pehrson + * Copyright (c) 1998-2002,2004,2006-2015 Glenn Randers-Pehrson * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger) * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.) * @@ -14,7 +14,7 @@ #include "pngpriv.h" /* Generate a compiler error if there is an old png.h in the search path. */ -typedef png_libpng_version_1_6_20 Your_png_h_is_not_version_1_6_20; +typedef png_libpng_version_1_6_21 Your_png_h_is_not_version_1_6_21; /* Tells libpng that we have already handled the first "num_bytes" bytes * of the PNG file signature. If the PNG data is embedded into another @@ -775,14 +775,15 @@ png_get_copyright(png_const_structrp png_ptr) #else # ifdef __STDC__ return PNG_STRING_NEWLINE \ - "libpng version 1.6.20 - December 3, 2015" PNG_STRING_NEWLINE \ - "Copyright (c) 1998-2015 Glenn Randers-Pehrson" PNG_STRING_NEWLINE \ + "libpng version 1.6.21 - January 15, 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.6.20 - December 3, 2015\ - Copyright (c) 1998-2015 Glenn Randers-Pehrson\ + return "libpng version 1.6.21 - January 15, 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."; # endif diff --git a/Build/source/libs/libpng/libpng-src/png.h b/Build/source/libs/libpng/libpng-src/png.h index 4d03dfc136c..123201d3a0e 100644 --- a/Build/source/libs/libpng/libpng-src/png.h +++ b/Build/source/libs/libpng/libpng-src/png.h @@ -1,9 +1,9 @@ /* png.h - header file for PNG reference library * - * libpng version 1.6.20, December 3, 2015 + * libpng version 1.6.21, January 15, 2016 * - * Copyright (c) 1998-2015 Glenn Randers-Pehrson + * Copyright (c) 1998-2002,2004,2006-2016 Glenn Randers-Pehrson * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger) * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.) * @@ -12,7 +12,7 @@ * Authors and maintainers: * libpng versions 0.71, May 1995, through 0.88, January 1996: Guy Schalnat * libpng versions 0.89, June 1996, through 0.96, May 1997: Andreas Dilger - * libpng versions 0.97, January 1998, through 1.6.20, December 3, 2015: + * libpng versions 0.97, January 1998, through 1.6.21, January 15, 2016: * Glenn Randers-Pehrson. * See also "Contributing Authors", below. */ @@ -25,8 +25,8 @@ * * This code is released under the libpng license. * - * libpng versions 1.0.7, July 1, 2000, through 1.6.20, December 3, 2015, are - * Copyright (c) 2000-2002, 2004, 2006-2015 Glenn Randers-Pehrson, are + * libpng versions 1.0.7, July 1, 2000, through 1.6.21, January 15, 2016, are + * Copyright (c) 2000-2002, 2004, 2006-2016 Glenn Randers-Pehrson, are * derived from libpng-1.0.6, and are distributed according to the same * disclaimer and license as libpng-1.0.6 with the following individuals * added to the list of Contributing Authors: @@ -186,7 +186,7 @@ * ... * 1.5.23 15 10523 15.so.15.23[.0] * ... - * 1.6.20 16 10620 16.so.16.20[.0] + * 1.6.21 16 10621 16.so.16.21[.0] * * Henceforth the source version will match the shared-library major * and minor numbers; the shared-library major version number will be @@ -214,13 +214,13 @@ * Y2K compliance in libpng: * ========================= * - * December 3, 2015 + * January 15, 2016 * * Since the PNG Development group is an ad-hoc body, we can't make * an official declaration. * * This is your unofficial assurance that libpng from version 0.71 and - * upward through 1.6.20 are Y2K compliant. It is my belief that + * upward through 1.6.21 are Y2K compliant. It is my belief that * earlier versions were also Y2K compliant. * * Libpng only has two year fields. One is a 2-byte unsigned integer @@ -282,9 +282,9 @@ */ /* Version information for png.h - this should match the version in png.c */ -#define PNG_LIBPNG_VER_STRING "1.6.20" +#define PNG_LIBPNG_VER_STRING "1.6.21" #define PNG_HEADER_VERSION_STRING \ - " libpng version 1.6.20 - December 3, 2015\n" + " libpng version 1.6.21 - January 15, 2016\n" #define PNG_LIBPNG_VER_SONUM 16 #define PNG_LIBPNG_VER_DLLNUM 16 @@ -292,7 +292,7 @@ /* These should match the first 3 components of PNG_LIBPNG_VER_STRING: */ #define PNG_LIBPNG_VER_MAJOR 1 #define PNG_LIBPNG_VER_MINOR 6 -#define PNG_LIBPNG_VER_RELEASE 20 +#define PNG_LIBPNG_VER_RELEASE 21 /* This should match the numeric part of the final component of * PNG_LIBPNG_VER_STRING, omitting any leading zero: @@ -323,7 +323,7 @@ * version 1.0.0 was mis-numbered 100 instead of 10000). From * version 1.0.1 it's xxyyzz, where x=major, y=minor, z=release */ -#define PNG_LIBPNG_VER 10620 /* 1.6.20 */ +#define PNG_LIBPNG_VER 10621 /* 1.6.21 */ /* Library configuration: these options cannot be changed after * the library has been built. @@ -433,7 +433,7 @@ extern "C" { /* This triggers a compiler error in png.c, if png.c and png.h * do not agree upon the version number. */ -typedef char* png_libpng_version_1_6_20; +typedef char* png_libpng_version_1_6_21; /* Basic control structions. Read libpng-manual.txt or libpng.3 for more info. * diff --git a/Build/source/libs/libpng/libpng-src/pngconf.h b/Build/source/libs/libpng/libpng-src/pngconf.h index 92f250000ce..93446545527 100644 --- a/Build/source/libs/libpng/libpng-src/pngconf.h +++ b/Build/source/libs/libpng/libpng-src/pngconf.h @@ -1,9 +1,9 @@ /* pngconf.h - machine configurable file for libpng * - * libpng version 1.6.20, December 3, 2015 + * libpng version 1.6.21, January 15, 2016 * - * Copyright (c) 1998-2015 Glenn Randers-Pehrson + * Copyright (c) 1998-2002,2004,2006-2015 Glenn Randers-Pehrson * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger) * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.) * diff --git a/Build/source/libs/libpng/libpng-src/pngdebug.h b/Build/source/libs/libpng/libpng-src/pngdebug.h index 6a01b106ede..15a7ed0c95f 100644 --- a/Build/source/libs/libpng/libpng-src/pngdebug.h +++ b/Build/source/libs/libpng/libpng-src/pngdebug.h @@ -2,7 +2,7 @@ /* pngdebug.h - Debugging macros for libpng, also used in pngtest.c * * Last changed in libpng 1.6.8 [December 19, 2013] - * Copyright (c) 1998-2013 Glenn Randers-Pehrson + * Copyright (c) 1998-2002,2004,2006-2013 Glenn Randers-Pehrson * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger) * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.) * diff --git a/Build/source/libs/libpng/libpng-src/pngerror.c b/Build/source/libs/libpng/libpng-src/pngerror.c index bdb959ee517..6904bea1a23 100644 --- a/Build/source/libs/libpng/libpng-src/pngerror.c +++ b/Build/source/libs/libpng/libpng-src/pngerror.c @@ -2,7 +2,7 @@ /* pngerror.c - stub functions for i/o and memory allocation * * Last changed in libpng 1.6.15 [November 20, 2014] - * Copyright (c) 1998-2014 Glenn Randers-Pehrson + * Copyright (c) 1998-2002,2004,2006-2014 Glenn Randers-Pehrson * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger) * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.) * diff --git a/Build/source/libs/libpng/libpng-src/pngget.c b/Build/source/libs/libpng/libpng-src/pngget.c index 743a6a9bbcc..ca44982a03f 100644 --- a/Build/source/libs/libpng/libpng-src/pngget.c +++ b/Build/source/libs/libpng/libpng-src/pngget.c @@ -2,7 +2,7 @@ /* pngget.c - retrieval of values from info struct * * Last changed in libpng 1.6.17 [March 26, 2015] - * Copyright (c) 1998-2015 Glenn Randers-Pehrson + * Copyright (c) 1998-2002,2004,2006-2015 Glenn Randers-Pehrson * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger) * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.) * diff --git a/Build/source/libs/libpng/libpng-src/pnginfo.h b/Build/source/libs/libpng/libpng-src/pnginfo.h index 4bd264b8690..361ed8be70f 100644 --- a/Build/source/libs/libpng/libpng-src/pnginfo.h +++ b/Build/source/libs/libpng/libpng-src/pnginfo.h @@ -2,7 +2,7 @@ /* pnginfo.h - header file for PNG reference library * * Last changed in libpng 1.6.1 [March 28, 2013] - * Copyright (c) 1998-2013 Glenn Randers-Pehrson + * Copyright (c) 1998-2002,2004,2006-2013 Glenn Randers-Pehrson * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger) * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.) * diff --git a/Build/source/libs/libpng/libpng-src/pnglibconf.h b/Build/source/libs/libpng/libpng-src/pnglibconf.h index adf4238ff78..a1ef17f85ba 100644 --- a/Build/source/libs/libpng/libpng-src/pnglibconf.h +++ b/Build/source/libs/libpng/libpng-src/pnglibconf.h @@ -1,8 +1,8 @@ -/* libpng 1.6.20 STANDARD API DEFINITION */ +/* libpng 1.6.21 STANDARD API DEFINITION */ /* pnglibconf.h - library build configuration */ -/* Libpng version 1.6.20 - December 3, 2015 */ +/* Libpng version 1.6.21 - January 15, 2016 */ /* Copyright (c) 1998-2015 Glenn Randers-Pehrson */ diff --git a/Build/source/libs/libpng/libpng-src/pngmem.c b/Build/source/libs/libpng/libpng-src/pngmem.c index 45ac5579b21..7bcfd005072 100644 --- a/Build/source/libs/libpng/libpng-src/pngmem.c +++ b/Build/source/libs/libpng/libpng-src/pngmem.c @@ -2,7 +2,7 @@ /* pngmem.c - stub functions for memory allocation * * Last changed in libpng 1.6.15 [November 20, 2014] - * Copyright (c) 1998-2014 Glenn Randers-Pehrson + * Copyright (c) 1998-2002,2004,2006-2014 Glenn Randers-Pehrson * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger) * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.) * diff --git a/Build/source/libs/libpng/libpng-src/pngpread.c b/Build/source/libs/libpng/libpng-src/pngpread.c index 89ffc4018f6..0dc1e53c224 100644 --- a/Build/source/libs/libpng/libpng-src/pngpread.c +++ b/Build/source/libs/libpng/libpng-src/pngpread.c @@ -2,7 +2,7 @@ /* pngpread.c - read a png file in push mode * * Last changed in libpng 1.6.18 [July 23, 2015] - * Copyright (c) 1998-2015 Glenn Randers-Pehrson + * Copyright (c) 1998-2002,2004,2006-2015 Glenn Randers-Pehrson * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger) * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.) * diff --git a/Build/source/libs/libpng/libpng-src/pngpriv.h b/Build/source/libs/libpng/libpng-src/pngpriv.h index e53fb0e5a3d..1295b5142a6 100644 --- a/Build/source/libs/libpng/libpng-src/pngpriv.h +++ b/Build/source/libs/libpng/libpng-src/pngpriv.h @@ -1,8 +1,8 @@ /* pngpriv.h - private declarations for use inside libpng * - * Last changed in libpng 1.6.18 [July 23, 2015] - * Copyright (c) 1998-2015 Glenn Randers-Pehrson + * Last changed in libpng 1.6.21 [January 15, 2016] + * Copyright (c) 1998-2002,2004,2006-2015 Glenn Randers-Pehrson * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger) * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.) * @@ -1917,6 +1917,9 @@ PNG_INTERNAL_FUNCTION(void, png_init_filter_functions_neon, (png_structp png_ptr, unsigned int bpp), PNG_EMPTY); #endif +PNG_INTERNAL_FUNCTION(png_uint_32, png_check_keyword, (png_structrp png_ptr, + png_const_charp key, png_bytep new_key), PNG_EMPTY); + /* Maintainer: Put new private prototypes here ^ */ #include "pngdebug.h" diff --git a/Build/source/libs/libpng/libpng-src/pngread.c b/Build/source/libs/libpng/libpng-src/pngread.c index 9cb4d2e41d2..dca3d7d5388 100644 --- a/Build/source/libs/libpng/libpng-src/pngread.c +++ b/Build/source/libs/libpng/libpng-src/pngread.c @@ -2,7 +2,7 @@ /* pngread.c - read a PNG file * * Last changed in libpng 1.6.17 [March 26, 2015] - * Copyright (c) 1998-2015 Glenn Randers-Pehrson + * Copyright (c) 1998-2002,2004,2006-2015 Glenn Randers-Pehrson * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger) * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.) * diff --git a/Build/source/libs/libpng/libpng-src/pngrio.c b/Build/source/libs/libpng/libpng-src/pngrio.c index 38f7fd49d68..5101d54a624 100644 --- a/Build/source/libs/libpng/libpng-src/pngrio.c +++ b/Build/source/libs/libpng/libpng-src/pngrio.c @@ -2,7 +2,7 @@ /* pngrio.c - functions for data input * * Last changed in libpng 1.6.17 [March 26, 2015] - * Copyright (c) 1998-2015 Glenn Randers-Pehrson + * Copyright (c) 1998-2002,2004,2006-2015 Glenn Randers-Pehrson * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger) * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.) * diff --git a/Build/source/libs/libpng/libpng-src/pngrtran.c b/Build/source/libs/libpng/libpng-src/pngrtran.c index f129ef129c0..e2331788639 100644 --- a/Build/source/libs/libpng/libpng-src/pngrtran.c +++ b/Build/source/libs/libpng/libpng-src/pngrtran.c @@ -2,7 +2,7 @@ /* pngrtran.c - transforms the data in a row for PNG readers * * Last changed in libpng 1.6.19 [November 12, 2015] - * Copyright (c) 1998-2015 Glenn Randers-Pehrson + * Copyright (c) 1998-2002,2004,2006-2015 Glenn Randers-Pehrson * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger) * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.) * diff --git a/Build/source/libs/libpng/libpng-src/pngrutil.c b/Build/source/libs/libpng/libpng-src/pngrutil.c index 61892513521..c9747fc27db 100644 --- a/Build/source/libs/libpng/libpng-src/pngrutil.c +++ b/Build/source/libs/libpng/libpng-src/pngrutil.c @@ -1,8 +1,8 @@ /* pngrutil.c - utilities to read a PNG file * - * Last changed in libpng 1.6.20 [December 3, 2015] - * Copyright (c) 1998-2015 Glenn Randers-Pehrson + * Last changed in libpng 1.6.20 [December 3, 2014] + * Copyright (c) 1998-2002,2004,2006-2015 Glenn Randers-Pehrson * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger) * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.) * diff --git a/Build/source/libs/libpng/libpng-src/pngset.c b/Build/source/libs/libpng/libpng-src/pngset.c index 8fd7965fca5..4bd5ab3cba7 100644 --- a/Build/source/libs/libpng/libpng-src/pngset.c +++ b/Build/source/libs/libpng/libpng-src/pngset.c @@ -1,7 +1,7 @@ /* pngset.c - storage of image information into info struct * - * Last changed in libpng 1.6.19 [November 12, 2015] + * Last changed in libpng 1.6.21 [January 15, 2016] * Copyright (c) 1998-2015 Glenn Randers-Pehrson * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger) * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.) @@ -1644,4 +1644,88 @@ png_set_check_for_invalid_index(png_structrp png_ptr, int allowed) png_ptr->num_palette_max = -1; } #endif + +#if defined(PNG_TEXT_SUPPORTED) || defined(PNG_pCAL_SUPPORTED) || \ + defined(PNG_iCCP_SUPPORTED) || defined(PNG_sPLT_SUPPORTED) +/* Check that the tEXt or zTXt keyword is valid per PNG 1.0 specification, + * and if invalid, correct the keyword rather than discarding the entire + * chunk. The PNG 1.0 specification requires keywords 1-79 characters in + * length, forbids leading or trailing whitespace, multiple internal spaces, + * and the non-break space (0x80) from ISO 8859-1. Returns keyword length. + * + * The 'new_key' buffer must be 80 characters in size (for the keyword plus a + * trailing '\0'). If this routine returns 0 then there was no keyword, or a + * valid one could not be generated, and the caller must png_error. + */ +png_uint_32 /* PRIVATE */ +png_check_keyword(png_structrp png_ptr, png_const_charp key, png_bytep new_key) +{ + png_const_charp orig_key = key; + png_uint_32 key_len = 0; + int bad_character = 0; + int space = 1; + + png_debug(1, "in png_check_keyword"); + + if (key == NULL) + { + *new_key = 0; + return 0; + } + + while (*key && key_len < 79) + { + png_byte ch = (png_byte)*key++; + + if ((ch > 32 && ch <= 126) || (ch >= 161 /*&& ch <= 255*/)) + *new_key++ = ch, ++key_len, space = 0; + + else if (space == 0) + { + /* A space or an invalid character when one wasn't seen immediately + * before; output just a space. + */ + *new_key++ = 32, ++key_len, space = 1; + + /* If the character was not a space then it is invalid. */ + if (ch != 32) + bad_character = ch; + } + + else if (bad_character == 0) + bad_character = ch; /* just skip it, record the first error */ + } + + if (key_len > 0 && space != 0) /* trailing space */ + { + --key_len, --new_key; + if (bad_character == 0) + bad_character = 32; + } + + /* Terminate the keyword */ + *new_key = 0; + + if (key_len == 0) + return 0; + +#ifdef PNG_WARNINGS_SUPPORTED + /* Try to only output one warning per keyword: */ + if (*key != 0) /* keyword too long */ + png_warning(png_ptr, "keyword truncated"); + + else if (bad_character != 0) + { + PNG_WARNING_PARAMETERS(p) + + png_warning_parameter(p, 1, orig_key); + png_warning_parameter_signed(p, 2, PNG_NUMBER_FORMAT_02x, bad_character); + + png_formatted_warning(png_ptr, p, "keyword \"@1\": bad character '0x@2'"); + } +#endif /* WARNINGS */ + + return key_len; +} +#endif /* TEXT || pCAL || iCCP || sPLT */ #endif /* READ || WRITE */ diff --git a/Build/source/libs/libpng/libpng-src/pngstruct.h b/Build/source/libs/libpng/libpng-src/pngstruct.h index d0bcc7914a5..c1f35edef5c 100644 --- a/Build/source/libs/libpng/libpng-src/pngstruct.h +++ b/Build/source/libs/libpng/libpng-src/pngstruct.h @@ -2,7 +2,7 @@ /* pngstruct.h - header file for PNG reference library * * Last changed in libpng 1.6.18 [July 23, 2015] - * Copyright (c) 1998-2015 Glenn Randers-Pehrson + * Copyright (c) 1998-2002,2004,2006-2015 Glenn Randers-Pehrson * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger) * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.) * diff --git a/Build/source/libs/libpng/libpng-src/pngtest.c b/Build/source/libs/libpng/libpng-src/pngtest.c index 5d50e66059b..57724e0651d 100644 --- a/Build/source/libs/libpng/libpng-src/pngtest.c +++ b/Build/source/libs/libpng/libpng-src/pngtest.c @@ -2,7 +2,7 @@ /* pngtest.c - a simple test program to test libpng * * Last changed in libpng 1.5.25 [December 3, 2015] - * Copyright (c) 1998-2015 Glenn Randers-Pehrson + * Copyright (c) 1998-2002,2004,2006-2015 Glenn Randers-Pehrson * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger) * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.) * @@ -2070,4 +2070,4 @@ main(void) #endif /* Generate a compiler error if there is an old png.h in the search path. */ -typedef png_libpng_version_1_6_20 Your_png_h_is_not_version_1_6_20; +typedef png_libpng_version_1_6_21 Your_png_h_is_not_version_1_6_21; diff --git a/Build/source/libs/libpng/libpng-src/pngtrans.c b/Build/source/libs/libpng/libpng-src/pngtrans.c index 0c0d92d8fd6..7f8cc455d33 100644 --- a/Build/source/libs/libpng/libpng-src/pngtrans.c +++ b/Build/source/libs/libpng/libpng-src/pngtrans.c @@ -2,7 +2,7 @@ /* pngtrans.c - transforms the data in a row (used by both readers and writers) * * Last changed in libpng 1.6.18 [July 23, 2015] - * Copyright (c) 1998-2015 Glenn Randers-Pehrson + * Copyright (c) 1998-2002,2004,2006-2015 Glenn Randers-Pehrson * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger) * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.) * diff --git a/Build/source/libs/libpng/libpng-src/pngwio.c b/Build/source/libs/libpng/libpng-src/pngwio.c index db76e6b8d78..586c03b7218 100644 --- a/Build/source/libs/libpng/libpng-src/pngwio.c +++ b/Build/source/libs/libpng/libpng-src/pngwio.c @@ -2,7 +2,7 @@ /* pngwio.c - functions for data output * * Last changed in libpng 1.6.15 [November 20, 2014] - * Copyright (c) 1998-2014 Glenn Randers-Pehrson + * Copyright (c) 1998-2002,2004,2006-2014 Glenn Randers-Pehrson * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger) * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.) * diff --git a/Build/source/libs/libpng/libpng-src/pngwrite.c b/Build/source/libs/libpng/libpng-src/pngwrite.c index 0d4ee9f7ae0..f843796b81e 100644 --- a/Build/source/libs/libpng/libpng-src/pngwrite.c +++ b/Build/source/libs/libpng/libpng-src/pngwrite.c @@ -2,7 +2,7 @@ /* pngwrite.c - general routines to write a PNG file * * Last changed in libpng 1.6.19 [November 12, 2015] - * Copyright (c) 1998-2015 Glenn Randers-Pehrson + * Copyright (c) 1998-2002,2004,2006-2015 Glenn Randers-Pehrson * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger) * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.) * diff --git a/Build/source/libs/libpng/libpng-src/pngwtran.c b/Build/source/libs/libpng/libpng-src/pngwtran.c index 5dc949157d4..038a2ef5dcd 100644 --- a/Build/source/libs/libpng/libpng-src/pngwtran.c +++ b/Build/source/libs/libpng/libpng-src/pngwtran.c @@ -2,7 +2,7 @@ /* pngwtran.c - transforms the data in a row for PNG writers * * Last changed in libpng 1.6.18 [July 23, 2015] - * Copyright (c) 1998-2015 Glenn Randers-Pehrson + * Copyright (c) 1998-2002,2004,2006-2015 Glenn Randers-Pehrson * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger) * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.) * diff --git a/Build/source/libs/libpng/libpng-src/pngwutil.c b/Build/source/libs/libpng/libpng-src/pngwutil.c index 0ee102b5fba..8cf4c2bb743 100644 --- a/Build/source/libs/libpng/libpng-src/pngwutil.c +++ b/Build/source/libs/libpng/libpng-src/pngwutil.c @@ -1,8 +1,8 @@ /* pngwutil.c - utilities to write a PNG file * - * Last changed in libpng 1.6.19 [November 12, 2015] - * Copyright (c) 1998-2015 Glenn Randers-Pehrson + * Last changed in libpng 1.6.21 [January 15, 2016] + * Copyright (c) 1998-2002,2004,2006-2015 Glenn Randers-Pehrson * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger) * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.) * @@ -665,90 +665,6 @@ png_write_compressed_data_out(png_structrp png_ptr, compression_state *comp) } #endif /* WRITE_COMPRESSED_TEXT */ -#if defined(PNG_WRITE_TEXT_SUPPORTED) || defined(PNG_WRITE_pCAL_SUPPORTED) || \ - defined(PNG_WRITE_iCCP_SUPPORTED) || defined(PNG_WRITE_sPLT_SUPPORTED) -/* Check that the tEXt or zTXt keyword is valid per PNG 1.0 specification, - * and if invalid, correct the keyword rather than discarding the entire - * chunk. The PNG 1.0 specification requires keywords 1-79 characters in - * length, forbids leading or trailing whitespace, multiple internal spaces, - * and the non-break space (0x80) from ISO 8859-1. Returns keyword length. - * - * The 'new_key' buffer must be 80 characters in size (for the keyword plus a - * trailing '\0'). If this routine returns 0 then there was no keyword, or a - * valid one could not be generated, and the caller must png_error. - */ -static png_uint_32 -png_check_keyword(png_structrp png_ptr, png_const_charp key, png_bytep new_key) -{ - png_const_charp orig_key = key; - png_uint_32 key_len = 0; - int bad_character = 0; - int space = 1; - - png_debug(1, "in png_check_keyword"); - - if (key == NULL) - { - *new_key = 0; - return 0; - } - - while (*key && key_len < 79) - { - png_byte ch = (png_byte)*key++; - - if ((ch > 32 && ch <= 126) || (ch >= 161 /*&& ch <= 255*/)) - *new_key++ = ch, ++key_len, space = 0; - - else if (space == 0) - { - /* A space or an invalid character when one wasn't seen immediately - * before; output just a space. - */ - *new_key++ = 32, ++key_len, space = 1; - - /* If the character was not a space then it is invalid. */ - if (ch != 32) - bad_character = ch; - } - - else if (bad_character == 0) - bad_character = ch; /* just skip it, record the first error */ - } - - if (key_len > 0 && space != 0) /* trailing space */ - { - --key_len, --new_key; - if (bad_character == 0) - bad_character = 32; - } - - /* Terminate the keyword */ - *new_key = 0; - - if (key_len == 0) - return 0; - -#ifdef PNG_WARNINGS_SUPPORTED - /* Try to only output one warning per keyword: */ - if (*key != 0) /* keyword too long */ - png_warning(png_ptr, "keyword truncated"); - - else if (bad_character != 0) - { - PNG_WARNING_PARAMETERS(p) - - png_warning_parameter(p, 1, orig_key); - png_warning_parameter_signed(p, 2, PNG_NUMBER_FORMAT_02x, bad_character); - - png_formatted_warning(png_ptr, p, "keyword \"@1\": bad character '0x@2'"); - } -#endif /* WARNINGS */ - - return key_len; -} -#endif /* WRITE_TEXT || WRITE_pCAL || WRITE_iCCP || WRITE_sPLT */ - /* Write the IHDR chunk, and update the png_struct with the necessary * information. Note that the rest of this code depends upon this * information being correct. diff --git a/Build/source/libs/libpng/libpng-src/projects/vstudio/WARNING b/Build/source/libs/libpng/libpng-src/projects/vstudio/WARNING deleted file mode 100644 index da002c937df..00000000000 --- a/Build/source/libs/libpng/libpng-src/projects/vstudio/WARNING +++ /dev/null @@ -1,27 +0,0 @@ -WARNING -======= -Libpng 1.6 does not use the default run-time library when building static -library builds of libpng; instead of the shared DLL runtime it uses a static -runtime. If you need to change this make sure to change the setting on all the -relevant projects: - -libpng -zlib -all the test programs - -The runtime library settings for each build are as follows: - - Release Debug -DLL /MD /MDd -Library /MT /MTd - -NOTICE that libpng 1.5 erroneously used /MD for Debug DLL builds; if you used -the debug builds in your app and you changed your app to use /MD you will need -to change it to /MDd for libpng 1.6. - -The Visual Studio 2010 defaults for a Win32 DLL or Static Library project are -as follows: - - Release Debug -DLL /MD /MDd -Static Library /MD /MDd diff --git a/Build/source/libs/libpng/libpng-src/projects/vstudio/readme.txt b/Build/source/libs/libpng/libpng-src/projects/vstudio/readme.txt index 38664638862..642a42b5893 100644 --- a/Build/source/libs/libpng/libpng-src/projects/vstudio/readme.txt +++ b/Build/source/libs/libpng/libpng-src/projects/vstudio/readme.txt @@ -1,9 +1,9 @@ VisualStudio instructions -libpng version 1.6.20 - December 3, 2015 +libpng version 1.6.21 - January 15, 2016 -Copyright (c) 1998-2010 Glenn Randers-Pehrson +Copyright (c) 2010,2013,2015 Glenn Randers-Pehrson This code is released under the libpng license. For conditions of distribution and use, see the disclaimer @@ -38,16 +38,17 @@ In particular the runtime library is the "MultiThreaded DLL" version. If you use Visual Studio defaults to build your application you will have no problems. -If you don't use the Visual Studio defaults your application must still be built -with the default runtime option (/MD). If, for some reason, it is not then your -application will crash inside libpng16.dll as soon as libpng tries to read -from a file handle you pass in. +If you don't use the Visual Studio defaults your application must still be +built with the default runtime option (/MD). If, for some reason, it is not +then your application will crash inside libpng16.dll as soon as libpng +tries to read from a file handle you pass in. If you do not want to use the DLL, for example for a very small application, the 'release library' configuration may be more appropriate. This is built with a non-standard runtime library - the "MultiThreaded" version. When you build your application it must be compiled with this option (/MT), otherwise -it will not build (if you are lucky) or crash (if you are not.) +it will not build (if you are lucky) or crash (if you are not.) See the +WARNING file that is distributed along with this readme.txt. Stop reading here ================= @@ -63,3 +64,32 @@ track down.) The debug build of libpng is minimally supported. Support for debug builds of zlib is also minimal. You really don't want to do this. + +WARNING +======= +Libpng 1.6.x does not use the default run-time library when building static +library builds of libpng; instead of the shared DLL runtime it uses a static +runtime. If you need to change this make sure to change the setting on all the +relevant projects: + + libpng + zlib + all the test programs + +The runtime library settings for each build are as follows: + + Release Debug + DLL /MD /MDd + Library /MT /MTd + +NOTICE that libpng 1.5.x erroneously used /MD for Debug DLL builds; if you used +the debug builds in your app and you changed your app to use /MD you will need +to change it back to /MDd for libpng 1.6.0 and later. + +The Visual Studio 2010 defaults for a Win32 DLL or Static Library project are +as follows: + + Release Debug + DLL /MD /MDd + Static Library /MD /MDd + diff --git a/Build/source/libs/libpng/libpng-src/projects/vstudio/zlib.props b/Build/source/libs/libpng/libpng-src/projects/vstudio/zlib.props index 7faf359435f..f06f8a0dcdf 100644 --- a/Build/source/libs/libpng/libpng-src/projects/vstudio/zlib.props +++ b/Build/source/libs/libpng/libpng-src/projects/vstudio/zlib.props @@ -2,7 +2,7 @@