summaryrefslogtreecommitdiff
path: root/Build/source/libs/libpng
diff options
context:
space:
mode:
authorAkira Kakuto <kakuto@fuk.kindai.ac.jp>2016-01-15 23:53:35 +0000
committerAkira Kakuto <kakuto@fuk.kindai.ac.jp>2016-01-15 23:53:35 +0000
commit37869ef337c30e7dabab5cb596f89ea4ad37c318 (patch)
tree97f53b7d3c86fdb3997cfc1ebaf2e246f1770a45 /Build/source/libs/libpng
parent07ee4de7ca2045ef92c95e08436a7baaa30c981b (diff)
linpng 1.6.21
git-svn-id: svn://tug.org/texlive/trunk@39398 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/libs/libpng')
-rw-r--r--Build/source/libs/libpng/ChangeLog5
-rw-r--r--Build/source/libs/libpng/README3
-rwxr-xr-xBuild/source/libs/libpng/configure20
-rw-r--r--Build/source/libs/libpng/libpng-src-PATCHES/TL-Changes4
-rw-r--r--Build/source/libs/libpng/libpng-src/ANNOUNCE66
-rw-r--r--Build/source/libs/libpng/libpng-src/CHANGES40
-rw-r--r--Build/source/libs/libpng/libpng-src/CMakeLists.txt4
-rw-r--r--Build/source/libs/libpng/libpng-src/LICENSE6
-rw-r--r--Build/source/libs/libpng/libpng-src/README2
-rw-r--r--Build/source/libs/libpng/libpng-src/configure.ac6
-rw-r--r--Build/source/libs/libpng/libpng-src/contrib/libtests/makepng.c2
-rw-r--r--Build/source/libs/libpng/libpng-src/contrib/libtests/pngstest.c2
-rw-r--r--Build/source/libs/libpng/libpng-src/contrib/libtests/pngvalid.c266
-rw-r--r--Build/source/libs/libpng/libpng-src/contrib/tools/pngfix.c10
-rw-r--r--Build/source/libs/libpng/libpng-src/libpng-manual.txt14
-rw-r--r--Build/source/libs/libpng/libpng-src/libpng.328
-rw-r--r--Build/source/libs/libpng/libpng-src/libpngpf.34
-rw-r--r--Build/source/libs/libpng/libpng-src/png.52
-rw-r--r--Build/source/libs/libpng/libpng-src/png.c13
-rw-r--r--Build/source/libs/libpng/libpng-src/png.h26
-rw-r--r--Build/source/libs/libpng/libpng-src/pngconf.h4
-rw-r--r--Build/source/libs/libpng/libpng-src/pngdebug.h2
-rw-r--r--Build/source/libs/libpng/libpng-src/pngerror.c2
-rw-r--r--Build/source/libs/libpng/libpng-src/pngget.c2
-rw-r--r--Build/source/libs/libpng/libpng-src/pnginfo.h2
-rw-r--r--Build/source/libs/libpng/libpng-src/pnglibconf.h4
-rw-r--r--Build/source/libs/libpng/libpng-src/pngmem.c2
-rw-r--r--Build/source/libs/libpng/libpng-src/pngpread.c2
-rw-r--r--Build/source/libs/libpng/libpng-src/pngpriv.h7
-rw-r--r--Build/source/libs/libpng/libpng-src/pngread.c2
-rw-r--r--Build/source/libs/libpng/libpng-src/pngrio.c2
-rw-r--r--Build/source/libs/libpng/libpng-src/pngrtran.c2
-rw-r--r--Build/source/libs/libpng/libpng-src/pngrutil.c4
-rw-r--r--Build/source/libs/libpng/libpng-src/pngset.c86
-rw-r--r--Build/source/libs/libpng/libpng-src/pngstruct.h2
-rw-r--r--Build/source/libs/libpng/libpng-src/pngtest.c4
-rw-r--r--Build/source/libs/libpng/libpng-src/pngtrans.c2
-rw-r--r--Build/source/libs/libpng/libpng-src/pngwio.c2
-rw-r--r--Build/source/libs/libpng/libpng-src/pngwrite.c2
-rw-r--r--Build/source/libs/libpng/libpng-src/pngwtran.c2
-rw-r--r--Build/source/libs/libpng/libpng-src/pngwutil.c88
-rw-r--r--Build/source/libs/libpng/libpng-src/projects/vstudio/WARNING27
-rw-r--r--Build/source/libs/libpng/libpng-src/projects/vstudio/readme.txt44
-rw-r--r--Build/source/libs/libpng/libpng-src/projects/vstudio/zlib.props2
-rw-r--r--Build/source/libs/libpng/libpng-src/scripts/README.txt10
-rw-r--r--Build/source/libs/libpng/libpng-src/scripts/def.c2
-rw-r--r--Build/source/libs/libpng/libpng-src/scripts/libpng-config-head.in2
-rw-r--r--Build/source/libs/libpng/libpng-src/scripts/libpng.pc.in2
-rw-r--r--Build/source/libs/libpng/libpng-src/scripts/makefile.cegcc2
-rw-r--r--Build/source/libs/libpng/libpng-src/scripts/makefile.linux2
-rw-r--r--Build/source/libs/libpng/libpng-src/scripts/makefile.msys2
-rw-r--r--Build/source/libs/libpng/libpng-src/scripts/makefile.ne12bsd2
-rw-r--r--Build/source/libs/libpng/libpng-src/scripts/makefile.netbsd2
-rw-r--r--Build/source/libs/libpng/libpng-src/scripts/makefile.openbsd2
-rw-r--r--Build/source/libs/libpng/libpng-src/scripts/pnglibconf.dfa12
-rw-r--r--Build/source/libs/libpng/libpng-src/scripts/pnglibconf.h.prebuilt4
-rw-r--r--Build/source/libs/libpng/libpng-src/scripts/symbols.def2
-rw-r--r--Build/source/libs/libpng/libpng-src/tests/pngstest4
-rw-r--r--Build/source/libs/libpng/version.ac2
59 files changed, 524 insertions, 349 deletions
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 <kakuto@fuk.kindai.ac.jp>
+
+ Import libpng-1.6.21.
+ * version.ac: Adjust.
+
2015-12-28 Akira Kakuto <kakuto@fuk.kindai.ac.jp>
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 <peb@mppmu.mpg.de>
2015-12-28 Akira Kakuto <kakuto@fuk.kindai.ac.jp>
+2016-01-15 Akira Kakuto <kakuto@fuk.kindai.ac.jp>
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 <tex-k@tug.org>.
#
@@ -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 <float.h> /* For floating point constants */
#include <stdlib.h> /* For malloc */
#include <string.h> /* 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<count; ++i)
+ {
+ unsigned char b2[2];
+ randomize(b2, sizeof b2);
+ *p16++ = png_get_uint_16(b2);
+ }
+}
+
+#ifdef __COVERITY__
+# define R16(this)\
+ r16(&(this), (sizeof (this))/2U/*(sizeof (png_uint_16))*/)
+#else
+# define R16(this)\
+ r16(&(this), (sizeof (this))/(sizeof (png_uint_16)))
+#endif
+
+#if defined PNG_READ_RGB_TO_GRAY_SUPPORTED ||\
+ defined PNG_READ_FILLER_SUPPORTED
+static void r32(png_uint_32p p32, size_t count)
+{
+ size_t i;
+
+ for (i=0; i<count; ++i)
+ {
+ unsigned char b4[4];
+ randomize(b4, sizeof b4);
+ *p32++ = png_get_uint_32(b4);
+ }
+}
+
+#ifdef __COVERITY__
+# define R32(this)\
+ r32(&(this), (sizeof (this))/4U/*(sizeof (png_uint_32))*/)
+#else
+# define R32(this)\
+ r32(&(this), (sizeof (this))/(sizeof (png_uint_32)))
+#endif
+
+#endif /* READ_FILLER || READ_RGB_TO_GRAY */
+
+#endif /* READ || WRITE_tRNS || WRITE_FILTER */
+
+#if defined PNG_READ_TRANSFORMS_SUPPORTED ||\
+ defined PNG_WRITE_FILTER_SUPPORTED
static unsigned int
random_mod(unsigned int max)
{
- unsigned int x;
+ png_uint_16 x;
- RANDOMIZE(x);
+ R16(x);
return x % max; /* 0 .. max-1 */
}
+#endif /* READ_TRANSFORMS || WRITE_FILTER */
#if (defined PNG_READ_RGB_TO_GRAY_SUPPORTED) ||\
(defined PNG_READ_FILLER_SUPPORTED)
@@ -305,12 +363,11 @@ random_choice(void)
{
unsigned char x;
- RANDOMIZE(x);
+ R8(x);
return x & 1;
}
-#endif
-#endif /* PNG_READ_SUPPORTED */
+#endif /* READ_RGB_TO_GRAY || READ_FILLER */
/* A numeric ID based on PNG file characteristics. The 'do_interlace' field
* simply records whether pngvalid did the interlace itself or whether it
@@ -1974,6 +2031,8 @@ typedef struct png_modifier
* internal check on pngvalid to ensure that the calculated error limits are
* not ridiculous; without this it is too easy to make a mistake in pngvalid
* that allows any value through.
+ *
+ * NOTE: this is not checked in release builds.
*/
double limit; /* limit on error values, normally 4E-3 */
@@ -3278,12 +3337,14 @@ set_random_tRNS(png_structp pp, png_infop pi, const png_byte colour_type,
png_color_16 tRNS;
const png_uint_16 mask = (png_uint_16)((1U << bit_depth)-1);
- RANDOMIZE(tRNS);
+ R8(tRNS); /* makes unset fields random */
if (colour_type & 2/*RGB*/)
{
if (bit_depth == 8)
{
+ R16(tRNS.red);
+ R16(tRNS.green);
tRNS.blue = tRNS.red ^ tRNS.green;
tRNS.red &= mask;
tRNS.green &= mask;
@@ -3292,13 +3353,17 @@ set_random_tRNS(png_structp pp, png_infop pi, const png_byte colour_type,
else /* bit_depth == 16 */
{
+ R16(tRNS.red);
tRNS.green = (png_uint_16)(tRNS.red * 257);
tRNS.blue = (png_uint_16)(tRNS.green * 17);
}
}
else
+ {
+ R16(tRNS.gray);
tRNS.gray &= mask;
+ }
png_set_tRNS(pp, pi, NULL, 0, &tRNS);
}
@@ -3649,6 +3714,28 @@ deinterlace_row(png_bytep buffer, png_const_bytep row,
* layout details. See make_size_images below for a way to make images
* that test odd sizes along with the libpng interlace handling.
*/
+#ifdef PNG_WRITE_FILTER_SUPPORTED
+static void
+choose_random_filter(png_structp pp, int start)
+{
+ /* Choose filters randomly except that on the very first row ensure that
+ * there is at least one previous row filter.
+ */
+ int filters = PNG_ALL_FILTERS & random_mod(256U);
+
+ /* There may be no filters; skip the setting. */
+ if (filters != 0)
+ {
+ if (start && filters < PNG_FILTER_UP)
+ filters |= PNG_FILTER_UP;
+
+ png_set_filter(pp, 0/*method*/, filters);
+ }
+}
+#else /* !WRITE_FILTER */
+# define choose_random_filter(pp, start) ((void)0)
+#endif /* !WRITE_FILTER */
+
static void
make_transform_image(png_store* const ps, png_byte const colour_type,
png_byte const bit_depth, unsigned int palette_number,
@@ -3767,6 +3854,7 @@ make_transform_image(png_store* const ps, png_byte const colour_type,
}
# endif /* do_own_interlace */
+ choose_random_filter(pp, pass == 0 && y == 0);
png_write_row(pp, buffer);
}
}
@@ -3943,9 +4031,6 @@ make_size_image(png_store* const ps, png_byte const colour_type,
int npasses = npasses_from_interlace_type(pp, interlace_type);
png_uint_32 y;
int pass;
-# ifdef PNG_WRITE_FILTER_SUPPORTED
- int nfilter = PNG_FILTER_VALUE_LAST;
-# endif
png_byte image[16][SIZE_ROWMAX];
/* To help consistent error detection make the parts of this buffer
@@ -4008,15 +4093,19 @@ make_size_image(png_store* const ps, png_byte const colour_type,
* does accept a filter number (per the spec) as well as a bit
* mask.
*
- * The apparent wackiness of decrementing nfilter rather than
- * incrementing is so that Paeth gets used in all images bigger
- * than 1 row - it's the tricky one.
+ * The code now uses filters at random, except that on the first
+ * row of an image it ensures that a previous row filter is in
+ * the set so that libpng allocates the row buffer.
*/
- png_set_filter(pp, 0/*method*/,
- nfilter >= 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<npasses; ++pass)
+ else
{
- png_uint_32 y;
+ int npasses = set_write_interlace_handling(pp, interlace_type);
+ int pass;
- for (y=0; y<h; ++y)
+ if (npasses != npasses_from_interlace_type(pp, interlace_type))
+ png_error(pp, "write: png_set_interlace_handling failed");
+
+ for (pass=0; pass<npasses; ++pass)
{
- png_byte buffer[TRANSFORM_ROWMAX];
+ png_uint_32 y;
- transform_row(pp, buffer, colour_type, bit_depth, y);
+ for (y=0; y<h; ++y)
+ {
+ png_byte buffer[TRANSFORM_ROWMAX];
-# if do_own_interlace
- /* If do_own_interlace *and* the image is interlaced we need a
- * reduced interlace row; this may be reduced to empty.
- */
- 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.
+ transform_row(pp, buffer, colour_type, bit_depth, y);
+
+# if do_own_interlace
+ /* If do_own_interlace *and* the image is interlaced we
+ * need a reduced interlace row; this may be reduced to
+ * empty.
*/
- 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 */
+ 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<<sample_depth)-1;
double in_min = ceil((in-err)*max - digitization_error);
double in_max = floor((in+err)*max + digitization_error);
- if (err > 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<<display->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
<glennrp at users.sourceforge.net>
- 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 <png.h>\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
<glennrp at users.sourceforge.net>
- 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 @@
<!--
* zlib.props - location of zlib source
*
- * libpng version 1.6.20 - December 3, 2015
+ * libpng version 1.6.21 - January 15, 2016
*
* Copyright (c) 1998-2011 Glenn Randers-Pehrson
*
diff --git a/Build/source/libs/libpng/libpng-src/scripts/README.txt b/Build/source/libs/libpng/libpng-src/scripts/README.txt
index 68245f0c859..25951aa4458 100644
--- a/Build/source/libs/libpng/libpng-src/scripts/README.txt
+++ b/Build/source/libs/libpng/libpng-src/scripts/README.txt
@@ -1,9 +1,9 @@
-Makefiles for libpng version 1.6.20 - December 3, 2015
+Makefiles for libpng version 1.6.21 - January 15, 2016
pnglibconf.h.prebuilt => Stores configuration settings
makefile.linux => Linux/ELF makefile
- (gcc, creates libpng16.so.16.1.6.20)
+ (gcc, creates libpng16.so.16.1.6.21)
makefile.gcc => Generic makefile (gcc, creates static libpng.a)
makefile.knr => Archaic UNIX Makefile that converts files with
ansi2knr (Requires ansi2knr.c from
@@ -33,12 +33,12 @@ pnglibconf.h.prebuilt => Stores configuration settings
makefile.os2 => OS/2 Makefile (gcc and emx, requires libpng.def)
makefile.sco => For SCO OSr5 ELF and Unixware 7 with Native cc
makefile.sggcc => Silicon Graphics (gcc,
- creates libpng16.so.16.1.6.20)
+ creates libpng16.so.16.1.6.21)
makefile.sgi => Silicon Graphics IRIX makefile (cc, creates static lib)
makefile.solaris => Solaris 2.X makefile (gcc,
- creates libpng16.so.16.1.6.20)
+ creates libpng16.so.16.1.6.21)
makefile.so9 => Solaris 9 makefile (gcc,
- creates libpng16.so.16.1.6.20)
+ creates libpng16.so.16.1.6.21)
makefile.std => Generic UNIX makefile (cc, creates static libpng.a)
makefile.sunos => Sun makefile
makefile.32sunu => Sun Ultra 32-bit makefile
diff --git a/Build/source/libs/libpng/libpng-src/scripts/def.c b/Build/source/libs/libpng/libpng-src/scripts/def.c
index c3e424df77d..d7e21a19aef 100644
--- a/Build/source/libs/libpng/libpng-src/scripts/def.c
+++ b/Build/source/libs/libpng/libpng-src/scripts/def.c
@@ -21,7 +21,7 @@ PNG_DFN "OS2 DESCRIPTION "PNG image compression library""
PNG_DFN "OS2 CODE PRELOAD MOVEABLE DISCARDABLE"
PNG_DFN ""
PNG_DFN "EXPORTS"
-PNG_DFN ";Version 1.6.20"
+PNG_DFN ";Version 1.6.21"
#define PNG_EXPORTA(ordinal, type, name, args, attributes)\
PNG_DFN "@" SYMBOL_PREFIX "@@" name "@"
diff --git a/Build/source/libs/libpng/libpng-src/scripts/libpng-config-head.in b/Build/source/libs/libpng/libpng-src/scripts/libpng-config-head.in
index 8e25732058b..0c3dd748cf9 100644
--- a/Build/source/libs/libpng/libpng-src/scripts/libpng-config-head.in
+++ b/Build/source/libs/libpng/libpng-src/scripts/libpng-config-head.in
@@ -11,7 +11,7 @@
# Modeled after libxml-config.
-version=1.6.20
+version=1.6.21
prefix=""
libdir=""
libs=""
diff --git a/Build/source/libs/libpng/libpng-src/scripts/libpng.pc.in b/Build/source/libs/libpng/libpng-src/scripts/libpng.pc.in
index 83f7accf12a..b97114cad79 100644
--- a/Build/source/libs/libpng/libpng-src/scripts/libpng.pc.in
+++ b/Build/source/libs/libpng/libpng-src/scripts/libpng.pc.in
@@ -5,6 +5,6 @@ includedir=@includedir@/libpng16
Name: libpng
Description: Loads and saves PNG files
-Version: 1.6.20
+Version: 1.6.21
Libs: -L${libdir} -lpng16
Cflags: -I${includedir}
diff --git a/Build/source/libs/libpng/libpng-src/scripts/makefile.cegcc b/Build/source/libs/libpng/libpng-src/scripts/makefile.cegcc
index 45eea776b8f..3d9545ec4f8 100644
--- a/Build/source/libs/libpng/libpng-src/scripts/makefile.cegcc
+++ b/Build/source/libs/libpng/libpng-src/scripts/makefile.cegcc
@@ -23,7 +23,7 @@
VERMAJ = 1
VERMIN = 6
-VERMIC = 20
+VERMIC = 21
VER = $(VERMAJ).$(VERMIN).$(VERMIC)
NAME = libpng
PACKAGE = $(NAME)-$(VER)
diff --git a/Build/source/libs/libpng/libpng-src/scripts/makefile.linux b/Build/source/libs/libpng/libpng-src/scripts/makefile.linux
index 27dda8517c5..1dc24093e23 100644
--- a/Build/source/libs/libpng/libpng-src/scripts/makefile.linux
+++ b/Build/source/libs/libpng/libpng-src/scripts/makefile.linux
@@ -10,7 +10,7 @@
# Library name:
LIBNAME = libpng16
PNGMAJ = 16
-RELEASE = 20
+RELEASE = 21
# Shared library names:
LIBSO=$(LIBNAME).so
diff --git a/Build/source/libs/libpng/libpng-src/scripts/makefile.msys b/Build/source/libs/libpng/libpng-src/scripts/makefile.msys
index fea7427fe66..8a8dee1ea83 100644
--- a/Build/source/libs/libpng/libpng-src/scripts/makefile.msys
+++ b/Build/source/libs/libpng/libpng-src/scripts/makefile.msys
@@ -18,7 +18,7 @@ exec_prefix=$(prefix)
# Library name:
LIBNAME = libpng16
PNGMAJ = 16
-RELEASE = 20
+RELEASE = 21
# Shared library names:
LIBSO=$(LIBNAME).dll
diff --git a/Build/source/libs/libpng/libpng-src/scripts/makefile.ne12bsd b/Build/source/libs/libpng/libpng-src/scripts/makefile.ne12bsd
index 58f4bda701c..f4cebc2376d 100644
--- a/Build/source/libs/libpng/libpng-src/scripts/makefile.ne12bsd
+++ b/Build/source/libs/libpng/libpng-src/scripts/makefile.ne12bsd
@@ -17,7 +17,7 @@ INCSDIR=${LOCALBASE}/include/libpng16
LIB= png16
SHLIB_MAJOR= 0
-SHLIB_MINOR= 1.6.20
+SHLIB_MINOR= 1.6.21
SRCS= png.c pngset.c pngget.c pngrutil.c pngtrans.c pngwutil.c \
pngread.c pngrio.c pngwio.c pngwrite.c pngrtran.c \
pngwtran.c pngmem.c pngerror.c pngpread.c
diff --git a/Build/source/libs/libpng/libpng-src/scripts/makefile.netbsd b/Build/source/libs/libpng/libpng-src/scripts/makefile.netbsd
index 407290e591e..da93b650bd2 100644
--- a/Build/source/libs/libpng/libpng-src/scripts/makefile.netbsd
+++ b/Build/source/libs/libpng/libpng-src/scripts/makefile.netbsd
@@ -17,7 +17,7 @@ INCSDIR=${LOCALBASE}/include
LIB= png
SHLIB_MAJOR= 16
-SHLIB_MINOR= 1.6.20
+SHLIB_MINOR= 1.6.21
SRCS= png.c pngset.c pngget.c pngrutil.c pngtrans.c pngwutil.c \
pngread.c pngrio.c pngwio.c pngwrite.c pngrtran.c \
pngwtran.c pngmem.c pngerror.c pngpread.c
diff --git a/Build/source/libs/libpng/libpng-src/scripts/makefile.openbsd b/Build/source/libs/libpng/libpng-src/scripts/makefile.openbsd
index ef5be815488..0696751a74c 100644
--- a/Build/source/libs/libpng/libpng-src/scripts/makefile.openbsd
+++ b/Build/source/libs/libpng/libpng-src/scripts/makefile.openbsd
@@ -11,7 +11,7 @@ LIBDIR= ${PREFIX}/lib
MANDIR= ${PREFIX}/man/cat
SHLIB_MAJOR= 16
-SHLIB_MINOR= 1.6.20
+SHLIB_MINOR= 1.6.21
LIB= png
SRCS= png.c pngerror.c pngget.c pngmem.c pngpread.c \
diff --git a/Build/source/libs/libpng/libpng-src/scripts/pnglibconf.dfa b/Build/source/libs/libpng/libpng-src/scripts/pnglibconf.dfa
index b2b7b430950..adffd30e03c 100644
--- a/Build/source/libs/libpng/libpng-src/scripts/pnglibconf.dfa
+++ b/Build/source/libs/libpng/libpng-src/scripts/pnglibconf.dfa
@@ -8,7 +8,7 @@ com pnglibconf.h - library build configuration
com
version
com
-com Copyright (c) 1998-2014 Glenn Randers-Pehrson
+com Copyright (c) 1998-2016 Glenn Randers-Pehrson
com
com This code is released under the libpng license.
com For conditions of distribution and use, see the disclaimer
@@ -274,12 +274,12 @@ setting DEFAULT_READ_MACROS default 1
option READ_INT_FUNCTIONS requires READ
-# The same for write, but these can only be switched off if
-# no writing is required at all - hence the use of an 'enables'
-# not a 'requires' below:
+# The same for write but these can only be switched off if no writing
+# is required at all - hence the use of a 'disabled', not a 'requires'.
+# If these are needed, they are enabled in the 'WRITE options' section
+# below.
option WRITE_INT_FUNCTIONS disabled
-option WRITE enables WRITE_INT_FUNCTIONS
# Error controls
#
@@ -490,7 +490,7 @@ option BUILD_GRAYSCALE_PALETTE
# WRITE options
-option WRITE
+option WRITE enables WRITE_INT_FUNCTIONS
# Disabling WRITE_16BIT prevents 16-bit PNG files from being
# generated.
diff --git a/Build/source/libs/libpng/libpng-src/scripts/pnglibconf.h.prebuilt b/Build/source/libs/libpng/libpng-src/scripts/pnglibconf.h.prebuilt
index adf4238ff78..a1ef17f85ba 100644
--- a/Build/source/libs/libpng/libpng-src/scripts/pnglibconf.h.prebuilt
+++ b/Build/source/libs/libpng/libpng-src/scripts/pnglibconf.h.prebuilt
@@ -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/scripts/symbols.def b/Build/source/libs/libpng/libpng-src/scripts/symbols.def
index a4b806b3c88..4c35fd763b5 100644
--- a/Build/source/libs/libpng/libpng-src/scripts/symbols.def
+++ b/Build/source/libs/libpng/libpng-src/scripts/symbols.def
@@ -1,4 +1,4 @@
-;Version 1.6.20
+;Version 1.6.21
;--------------------------------------------------------------
; LIBPNG symbol list as a Win32 DEF file
; Contains all the symbols that can be exported from libpng
diff --git a/Build/source/libs/libpng/libpng-src/tests/pngstest b/Build/source/libs/libpng/libpng-src/tests/pngstest
index 255ed098f17..0400b073fe2 100644
--- a/Build/source/libs/libpng/libpng-src/tests/pngstest
+++ b/Build/source/libs/libpng/libpng-src/tests/pngstest
@@ -17,7 +17,7 @@ gamma="$1"
shift
alpha="$1"
shift
-exec ./pngstest --tmpfile "${gamma}-${alpha}-" --log ${1+"$@"} $(
+exec ./pngstest --tmpfile "${gamma}-${alpha}-" --log ${1+"$@"} `
for f in "${srcdir}/contrib/testpngs/"*.png
do
g=
@@ -49,4 +49,4 @@ exec ./pngstest --tmpfile "${gamma}-${alpha}-" --log ${1+"$@"} $(
test "$alpha" = "opaque" -o "$alpha" = "none" && echo "$g";;
esac
done
-)
+`
diff --git a/Build/source/libs/libpng/version.ac b/Build/source/libs/libpng/version.ac
index 11b029e294e..fd55dc0d3e1 100644
--- a/Build/source/libs/libpng/version.ac
+++ b/Build/source/libs/libpng/version.ac
@@ -8,4 +8,4 @@ dnl
dnl --------------------------------------------------------
dnl
dnl m4-include this file to define the current libpng version
-m4_define([libpng_version], [1.6.20])
+m4_define([libpng_version], [1.6.21])