summaryrefslogtreecommitdiff
path: root/Build
diff options
context:
space:
mode:
authorAkira Kakuto <kakuto@fuk.kindai.ac.jp>2017-06-28 21:16:42 +0000
committerAkira Kakuto <kakuto@fuk.kindai.ac.jp>2017-06-28 21:16:42 +0000
commite642cf26acb4cb9760bc03542f09591967b1d40e (patch)
tree35804399b8f63b6019dda2db0cad2c26cf1f82fe /Build
parent3c98fd95233b90e9444733fad8682ac65aab451e (diff)
libpng-1.6.30
git-svn-id: svn://tug.org/texlive/trunk@44717 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build')
-rw-r--r--Build/source/libs/README2
-rw-r--r--Build/source/libs/libpng/ChangeLog5
-rw-r--r--Build/source/libs/libpng/README6
-rw-r--r--Build/source/libs/libpng/TLpatches/ChangeLog4
-rw-r--r--Build/source/libs/libpng/TLpatches/TL-Changes4
-rwxr-xr-xBuild/source/libs/libpng/configure20
-rw-r--r--Build/source/libs/libpng/libpng-src/ANNOUNCE55
-rw-r--r--Build/source/libs/libpng/libpng-src/CHANGES42
-rw-r--r--Build/source/libs/libpng/libpng-src/CMakeLists.txt16
-rw-r--r--Build/source/libs/libpng/libpng-src/INSTALL4
-rw-r--r--Build/source/libs/libpng/libpng-src/LICENSE4
-rw-r--r--Build/source/libs/libpng/libpng-src/README12
-rw-r--r--Build/source/libs/libpng/libpng-src/configure.ac6
-rw-r--r--Build/source/libs/libpng/libpng-src/contrib/arm-neon/android-ndk.c2
-rw-r--r--Build/source/libs/libpng/libpng-src/contrib/examples/pngtopng.c2
-rw-r--r--Build/source/libs/libpng/libpng-src/contrib/gregbook/README4
-rw-r--r--Build/source/libs/libpng/libpng-src/contrib/gregbook/readpng.c8
-rw-r--r--Build/source/libs/libpng/libpng-src/contrib/gregbook/readpng2.c1
-rw-r--r--Build/source/libs/libpng/libpng-src/contrib/gregbook/readppm.c13
-rw-r--r--Build/source/libs/libpng/libpng-src/contrib/gregbook/rpng-win.c9
-rw-r--r--Build/source/libs/libpng/libpng-src/contrib/gregbook/rpng-x.c3
-rw-r--r--Build/source/libs/libpng/libpng-src/contrib/gregbook/rpng2-win.c12
-rw-r--r--Build/source/libs/libpng/libpng-src/contrib/gregbook/rpng2-x.c11
-rw-r--r--Build/source/libs/libpng/libpng-src/contrib/gregbook/wpng.c16
-rw-r--r--Build/source/libs/libpng/libpng-src/contrib/gregbook/writepng.c2
-rw-r--r--Build/source/libs/libpng/libpng-src/contrib/pngminus/png2pnm.c5
-rw-r--r--Build/source/libs/libpng/libpng-src/contrib/pngminus/pnm2png.c4
-rw-r--r--Build/source/libs/libpng/libpng-src/contrib/tools/genpng.c16
-rw-r--r--Build/source/libs/libpng/libpng-src/contrib/tools/sRGB.h2
-rw-r--r--Build/source/libs/libpng/libpng-src/contrib/visupng/PngFile.c6
-rw-r--r--Build/source/libs/libpng/libpng-src/contrib/visupng/VisualPng.c10
-rw-r--r--Build/source/libs/libpng/libpng-src/example.c5
-rw-r--r--Build/source/libs/libpng/libpng-src/libpng-manual.txt100
-rw-r--r--Build/source/libs/libpng/libpng-src/libpng.3120
-rw-r--r--Build/source/libs/libpng/libpng-src/libpngpf.38
-rw-r--r--Build/source/libs/libpng/libpng-src/png.510
-rw-r--r--Build/source/libs/libpng/libpng-src/png.c55
-rw-r--r--Build/source/libs/libpng/libpng-src/png.h26
-rw-r--r--Build/source/libs/libpng/libpng-src/pngconf.h2
-rw-r--r--Build/source/libs/libpng/libpng-src/pnglibconf.h6
-rw-r--r--Build/source/libs/libpng/libpng-src/pngpriv.h13
-rw-r--r--Build/source/libs/libpng/libpng-src/pngrtran.c8
-rw-r--r--Build/source/libs/libpng/libpng-src/pngrutil.c19
-rw-r--r--Build/source/libs/libpng/libpng-src/pngset.c15
-rw-r--r--Build/source/libs/libpng/libpng-src/pngtest.c2
-rw-r--r--Build/source/libs/libpng/libpng-src/pngtrans.c38
-rw-r--r--Build/source/libs/libpng/libpng-src/pngwutil.c6
-rw-r--r--Build/source/libs/libpng/libpng-src/projects/owatcom/pngconfig.mak2
-rw-r--r--Build/source/libs/libpng/libpng-src/projects/vstudio/README.txt2
-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.linux4
-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/makefile.solaris-x862
-rw-r--r--Build/source/libs/libpng/libpng-src/scripts/pnglibconf.dfa2
-rw-r--r--Build/source/libs/libpng/libpng-src/scripts/pnglibconf.h.prebuilt6
-rw-r--r--Build/source/libs/libpng/libpng-src/scripts/symbols.def2
-rw-r--r--Build/source/libs/libpng/version.ac2
65 files changed, 520 insertions, 269 deletions
diff --git a/Build/source/libs/README b/Build/source/libs/README
index 49619a0fcac..02c86e16515 100644
--- a/Build/source/libs/README
+++ b/Build/source/libs/README
@@ -33,7 +33,7 @@ icu 58.2 - checked 13mar17
libpaper 1.1.24+nmu2 - checked 24oct13
ftp://ftp.de.debian.org/debian/pool/main/libp/libpaper/
-libpng 1.6.29 - checked 16mar17
+libpng 1.6.30 - checked 28jun17
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 66c275438c0..ebfd91abfbd 100644
--- a/Build/source/libs/libpng/ChangeLog
+++ b/Build/source/libs/libpng/ChangeLog
@@ -1,3 +1,8 @@
+2017-06-28 Akira Kakuto <kakuto@fuk.kindai.ac.jp>
+
+ Import libpng-1.6.30.
+ * version.ac: Adjust.
+
2017-03-27 Karl Berry <karl@freefriends.org>
* Makefile.am (AM_TESTS_ENVIRONMENT): use instead of TESTS_ENVIRONMENT.
diff --git a/Build/source/libs/libpng/README b/Build/source/libs/libpng/README
index 072a02a8032..d66901889ac 100644
--- a/Build/source/libs/libpng/README
+++ b/Build/source/libs/libpng/README
@@ -1,11 +1,11 @@
- Building libpng-1.6.29 as part of the TL tree
+ Building libpng-1.6.30 as part of the TL tree
=============================================
This directory libs/libpng/ uses a proxy Makefile.am to build the libpng library
from the unmodified (*) source tree in libs/libpng/libpng-src/, bypassing
the original build system.
-(*) The directory libpng-PATCHES contains patches (if any) applied to
+(*) The directory TLpatches contains patches (if any) applied to
the original source tree.
As far as applicable, the tests in libs/libpng-src/configure.ac have been
@@ -14,4 +14,4 @@ copied to libs/libpng/configure.ac.
=============================
2009-07-23 Peter Breitenlohner <peb@mppmu.mpg.de>
-2017-03-16 Akira Kakuto <kakuto@fuk.kindai.ac.jp>
+2017-06-28 Akira Kakuto <kakuto@fuk.kindai.ac.jp>
diff --git a/Build/source/libs/libpng/TLpatches/ChangeLog b/Build/source/libs/libpng/TLpatches/ChangeLog
index 70d8ec5de3c..5dd9494aaa0 100644
--- a/Build/source/libs/libpng/TLpatches/ChangeLog
+++ b/Build/source/libs/libpng/TLpatches/ChangeLog
@@ -1,3 +1,7 @@
+2017-06-28 Akira Kakuto <kakuto@fuk.kindai.ac.jp>
+
+ Import libpng-1.6.30.
+
2017-03-16 Akira Kakuto <kakuto@fuk.kindai.ac.jp>
Import libpng-1.6.29.
diff --git a/Build/source/libs/libpng/TLpatches/TL-Changes b/Build/source/libs/libpng/TLpatches/TL-Changes
index 7b7162f8f96..3bb94624f70 100644
--- a/Build/source/libs/libpng/TLpatches/TL-Changes
+++ b/Build/source/libs/libpng/TLpatches/TL-Changes
@@ -1,5 +1,5 @@
-Changes applied to the libpng-1.6.29/ tree as obtained from:
- http://www.libpng.org/ libpng-1.6.29.tar.xz
+Changes applied to the libpng-1.6.30/ tree as obtained from:
+ http://www.libpng.org/ libpng-1.6.30.tar.xz
Copied:
scripts/pnglibconf.h.prebuilt -> pnglibconf.h
diff --git a/Build/source/libs/libpng/configure b/Build/source/libs/libpng/configure
index e9a70b0260c..cec5f77d21f 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.29.
+# Generated by GNU Autoconf 2.69 for libpng (TeX Live) 1.6.30.
#
# 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.29'
-PACKAGE_STRING='libpng (TeX Live) 1.6.29'
+PACKAGE_VERSION='1.6.30'
+PACKAGE_STRING='libpng (TeX Live) 1.6.30'
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.29 to adapt to many kinds of systems.
+\`configure' configures libpng (TeX Live) 1.6.30 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.29:";;
+ short | recursive ) echo "Configuration of libpng (TeX Live) 1.6.30:";;
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.29
+libpng (TeX Live) configure 1.6.30
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.29, which was
+It was created by libpng (TeX Live) $as_me 1.6.30, 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.29'
+ VERSION='1.6.30'
cat >>confdefs.h <<_ACEOF
@@ -6358,7 +6358,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.29, which was
+This file was extended by libpng (TeX Live) $as_me 1.6.30, which was
generated by GNU Autoconf 2.69. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -6424,7 +6424,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.29
+libpng (TeX Live) config.status 1.6.30
configured by $0, generated by GNU Autoconf 2.69,
with options \\"\$ac_cs_config\\"
diff --git a/Build/source/libs/libpng/libpng-src/ANNOUNCE b/Build/source/libs/libpng/libpng-src/ANNOUNCE
index d3ae02c7f5d..51c3a7ca70c 100644
--- a/Build/source/libs/libpng/libpng-src/ANNOUNCE
+++ b/Build/source/libs/libpng/libpng-src/ANNOUNCE
@@ -1,4 +1,4 @@
-Libpng 1.6.29 - March 16, 2017
+Libpng 1.6.30 - June 28, 2017
This is a public release of libpng, intended for use in production codes.
@@ -7,37 +7,42 @@ Files available for download:
Source files with LF line endings (for Unix/Linux) and with a
"configure" script
- libpng-1.6.29.tar.xz (LZMA-compressed, recommended)
- libpng-1.6.29.tar.gz
+ libpng-1.6.30.tar.xz (LZMA-compressed, recommended)
+ libpng-1.6.30.tar.gz
Source files with CRLF line endings (for Windows), without the
"configure" script
- lpng1629.7z (LZMA-compressed, recommended)
- lpng1629.zip
+ lpng1630.7z (LZMA-compressed, recommended)
+ lpng1630.zip
Other information:
- libpng-1.6.29-README.txt
- libpng-1.6.29-LICENSE.txt
- libpng-1.6.29-*.asc (armored detached GPG signatures)
-
-Changes since the last public release (1.6.28):
-
- Readded "include(GNUInstallDirs)" to CMakeLists.txt (Gianfranco Costamagna).
- Moved SSE2 optimization code into the main libpng source directory.
- Configure libpng with "configure --enable-intel-sse" or compile
- libpng with "-DPNG_INTEL_SSE" in CPPFLAGS to enable it.
- Simplified conditional compilation in pngvalid.c, for AIX (Michael Felt).
- Avoid conditional directives that break statements in pngrutil.c (Romero
- Malaquias)
- The contrib/examples/pngtopng.c recovery code was in the wrong "if"
- branches; the comments were correct.
- Added code for PowerPC VSX optimisation (Vadim Barkov).
- Avoid potential overflow of shift operations in png_do_expand() (Aaron Boxer).
- Change test ZLIB_VERNUM >= 0x1281 to ZLIB_VERNUM >= 0x1290 in pngrutil.c
- because Solaris 11 distributes zlib-1.2.8.f that is older than 1.2.8.1.
- Suppress clang warnings about implicit sign changes in png.c
+ libpng-1.6.30-README.txt
+ libpng-1.6.30-LICENSE.txt
+ libpng-1.6.30-*.asc (armored detached GPG signatures)
+
+Changes since the last public release (1.6.29):
+
+ Added missing "$(CPPFLAGS)" to the compile line for c.pic.o in
+ makefile.linux and makefile.solaris-x86 (Cosmin).
+ Revised documentation of png_get_error_ptr() in the libpng manual.
+ Silence clang -Wcomma and const drop warnings (Viktor Szakats).
+ Update Sourceforge URLs in documentation (https instead of http).
+ Document need to check for integer overflow when allocating a pixel
+ buffer for multiple rows in contrib/gregbook, contrib/pngminus,
+ example.c, and in the manual (suggested by Jaeseung Choi). This
+ is similar to the bug reported against pngquant in CVE-2016-5735.
+ Removed reference to the obsolete PNG_SAFE_LIMITS macro in the documentation.
+ Check for integer overflow in contrib/visupng and contrib/tools/genpng.
+ Do not double evaluate CMAKE_SYSTEM_PROCESSOR in CMakeLists.txt.
+ Test CMAKE_HOST_WIN32 instead of WIN32 in CMakeLists.txt.
+ Fix some URL in documentation.
+ Avoid writing an empty IDAT when the last IDAT exactly fills the
+ compression buffer (bug report by Brian Baird). This bug was
+ introduced in libpng-1.6.0.
+ Update copyright year in pnglibconf.h, make ltmain.sh executable.
+ Add a reference to the libpng.download site in README.
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 5f5147df308..b8e0f974260 100644
--- a/Build/source/libs/libpng/libpng-src/CHANGES
+++ b/Build/source/libs/libpng/libpng-src/CHANGES
@@ -5761,7 +5761,9 @@ Version 1.6.27beta01 [November 2, 2016]
if built with zlib-1.2.8.1.
Version 1.6.27rc01 [December 27, 2016]
- Control ADLER32 checking with new PNG_IGNORE_ADLER32 option.
+ Control ADLER32 checking with new PNG_IGNORE_ADLER32 option. Fixes
+ an endless loop when handling erroneous ADLER32 checksums; bug
+ introduced in libpng-1.6.26.
Removed the use of a macro containing the pre-processor 'defined'
operator. It is unclear whether this is valid; a macro that
"generates" 'defined' is not permitted, but the use of the word
@@ -5811,12 +5813,48 @@ Version 1.6.29beta02 [February 22, 2017]
Version 1.6.29beta03 [March 1, 2017]
Avoid potential overflow of shift operations in png_do_expand() (Aaron Boxer).
Change test ZLIB_VERNUM >= 0x1281 to ZLIB_VERNUM >= 0x1290 in pngrutil.c
- because Solaris 11 distributes zlib-1.2.8.f that is older than 1.2.8.1.
+ because Solaris 11 distributes zlib-1.2.8.f that is older than 1.2.8.1,
+ as suggested in zlib FAQ, item 24.
Suppress clang warnings about implicit sign changes in png.c
Version 1.6.29 [March 16, 2017]
No changes.
+Version 1.6.30beta01 [April 1, 2017]
+ Added missing "$(CPPFLAGS)" to the compile line for c.pic.o in
+ makefile.linux and makefile.solaris-x86 (Cosmin).
+ Revised documentation of png_get_error_ptr() in the libpng manual.
+ Silence clang -Wcomma and const drop warnings (Viktor Szakats).
+ Update Sourceforge URLs in documentation (https instead of http).
+
+Version 1.6.30beta02 [April 22, 2017]
+ Document need to check for integer overflow when allocating a pixel
+ buffer for multiple rows in contrib/gregbook, contrib/pngminus,
+ example.c, and in the manual (suggested by Jaeseung Choi). This
+ is similar to the bug reported against pngquant in CVE-2016-5735.
+ Removed reference to the obsolete PNG_SAFE_LIMITS macro in the documentation.
+
+Version 1.6.30beta03 [May 22, 2017]
+ Check for integer overflow in contrib/visupng and contrib/tools/genpng.
+ Do not double evaluate CMAKE_SYSTEM_PROCESSOR in CMakeLists.txt.
+ Test CMAKE_HOST_WIN32 instead of WIN32 in CMakeLists.txt.
+ Fix some URL in documentation.
+
+Version 1.6.30beta04 [June 7, 2017]
+ Avoid writing an empty IDAT when the last IDAT exactly fills the
+ compression buffer (bug report by Brian Baird). This bug was
+ introduced in libpng-1.6.0.
+
+Version 1.6.30rc01 [June 14, 2017]
+ No changes.
+
+Version 1.6.30rc02 [June 25, 2017]
+ Update copyright year in pnglibconf.h, make ltmain.sh executable.
+ Add a reference to the libpng.download site in README.
+
+Version 1.6.30 [June 28, 2017]
+ No changes.
+
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 3b6c1f30d38..739ce158136 100644
--- a/Build/source/libs/libpng/libpng-src/CMakeLists.txt
+++ b/Build/source/libs/libpng/libpng-src/CMakeLists.txt
@@ -36,7 +36,7 @@ enable_testing()
set(PNGLIB_MAJOR 1)
set(PNGLIB_MINOR 6)
-set(PNGLIB_RELEASE 29)
+set(PNGLIB_RELEASE 30)
set(PNGLIB_NAME libpng${PNGLIB_MAJOR}${PNGLIB_MINOR})
set(PNGLIB_VERSION ${PNGLIB_MAJOR}.${PNGLIB_MINOR}.${PNGLIB_RELEASE})
@@ -80,8 +80,8 @@ set(PNG_PREFIX "" CACHE STRING "Prefix to add to the API function names")
set(DFA_XTRA "" CACHE FILEPATH "File containing extra configuration settings")
# set definitions and sources for arm
-if(${CMAKE_SYSTEM_PROCESSOR} MATCHES "^arm" OR
- ${CMAKE_SYSTEM_PROCESSOR} MATCHES "^aarch64")
+if(CMAKE_SYSTEM_PROCESSOR MATCHES "^arm" OR
+ CMAKE_SYSTEM_PROCESSOR MATCHES "^aarch64")
set(PNG_ARM_NEON_POSSIBLE_VALUES check on off)
set(PNG_ARM_NEON "check" CACHE STRING "Enable ARM NEON optimizations:
check: (default) use internal checking code;
@@ -110,8 +110,8 @@ if(${CMAKE_SYSTEM_PROCESSOR} MATCHES "^arm" OR
endif()
# set definitions and sources for powerpc
-if(${CMAKE_SYSTEM_PROCESSOR} MATCHES "^powerpc*" OR
- ${CMAKE_SYSTEM_PROCESSOR} MATCHES "^ppc64*" )
+if(CMAKE_SYSTEM_PROCESSOR MATCHES "^powerpc*" OR
+ CMAKE_SYSTEM_PROCESSOR MATCHES "^ppc64*" )
set(PNG_POWERPC_VSX_POSSIBLE_VALUES check on off)
set(PNG_POWERPC_VSX "check" CACHE STRING "Enable POWERPC VSX optimizations:
check: (default) use internal checking code;
@@ -718,7 +718,7 @@ ENDIF(NOT CMAKE_LIBRARY_OUTPUT_DIRECTORY)
# copies if different.
macro(CREATE_SYMLINK SRC_FILE DEST_FILE)
FILE(REMOVE ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/${DEST_FILE})
- if(WIN32 AND NOT CYGWIN AND NOT MSYS)
+ if(CMAKE_HOST_WIN32 AND NOT CYGWIN AND NOT MSYS)
ADD_CUSTOM_COMMAND(
OUTPUT ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/${DEST_FILE} ${CMAKE_CURRENT_BINARY_DIR}/${DEST_FILE}
COMMAND ${CMAKE_COMMAND} -E copy_if_different "${SRC_FILE}" ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/${DEST_FILE}
@@ -770,7 +770,7 @@ endif(NOT WIN32 OR CYGWIN OR MINGW)
# SET UP LINKS
if(PNG_SHARED)
set_target_properties(png PROPERTIES
-# VERSION 16.${PNGLIB_RELEASE}.1.6.29
+# VERSION 16.${PNGLIB_RELEASE}.1.6.30
VERSION 16.${PNGLIB_RELEASE}.0
SOVERSION 16
CLEAN_DIRECT_OUTPUT 1)
@@ -846,7 +846,7 @@ if(NOT SKIP_INSTALL_FILES AND NOT SKIP_INSTALL_ALL )
install(FILES libpng.3 libpngpf.3 DESTINATION ${PNG_MAN_DIR}/man3)
install(FILES png.5 DESTINATION ${PNG_MAN_DIR}/man5)
# Install pkg-config files
- if(NOT WIN32 OR CYGWIN OR MINGW)
+ if(NOT CMAKE_HOST_WIN32 OR CYGWIN OR MINGW)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/libpng.pc
DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig)
install(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/libpng-config
diff --git a/Build/source/libs/libpng/libpng-src/INSTALL b/Build/source/libs/libpng/libpng-src/INSTALL
index 58ec0b60a71..48b1250492b 100644
--- a/Build/source/libs/libpng/libpng-src/INSTALL
+++ b/Build/source/libs/libpng/libpng-src/INSTALL
@@ -78,8 +78,8 @@ Or you can use one of the "projects" in the "projects" directory.
Before installing libpng, you must first install zlib, if it
is not already on your system. zlib can usually be found
-wherever you got libpng; otherwise go to http://zlib.net. You can place
-zlib in the same directory as libpng or in another directory.
+wherever you got libpng; otherwise go to https://zlib.net/. You can
+place zlib in the same directory as libpng or in another directory.
If your system already has a preinstalled zlib you will still need
to have access to the zlib.h and zconf.h include files that
diff --git a/Build/source/libs/libpng/libpng-src/LICENSE b/Build/source/libs/libpng/libpng-src/LICENSE
index aac9f743a83..9e935787d02 100644
--- a/Build/source/libs/libpng/libpng-src/LICENSE
+++ b/Build/source/libs/libpng/libpng-src/LICENSE
@@ -10,7 +10,7 @@ this sentence.
This code is released under the libpng license.
-libpng versions 1.0.7, July 1, 2000 through 1.6.29, March 16, 2017 are
+libpng versions 1.0.7, July 1, 2000 through 1.6.30, June 28, 2017 are
Copyright (c) 2000-2002, 2004, 2006-2017 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
@@ -130,4 +130,4 @@ any encryption software. See the EAR, paragraphs 734.3(b)(3) and
Glenn Randers-Pehrson
glennrp at users.sourceforge.net
-March 16, 2017
+April 1, 2017
diff --git a/Build/source/libs/libpng/libpng-src/README b/Build/source/libs/libpng/libpng-src/README
index 07562fce7e1..65dccaf64e2 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.29 - March 16, 2017 (shared library 16.0)
+README for libpng version 1.6.30 - June 28, 2017 (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.
@@ -23,7 +23,7 @@ earlier versions if you are using a shared library. The type of the
png_uint_32, which will affect shared-library applications that use
this function.
-To avoid problems with changes to the internals of png info_struct,
+To avoid problems with changes to the internals of the png info_struct,
new APIs have been made available in 0.95 to avoid direct application
access to info_ptr. These functions are the png_set_<chunk> and
png_get_<chunk> functions. These functions should be used when
@@ -88,11 +88,11 @@ zlib should be available at the same place that libpng is, or at zlib.net.
You may also want a copy of the PNG specification. It is available
as an RFC, a W3C Recommendation, and an ISO/IEC Standard. You can find
-these at http://www.libpng.org/pub/png/documents/
+these at http://www.libpng.org/pub/png/pngdocs.html .
-This code is currently being archived at libpng.sf.net in the
-[DOWNLOAD] area, and at ftp://ftp.simplesystems.org. If you can't find it
-in any of those places, e-mail me, and I'll help you find it.
+This code is currently being archived at libpng.sourceforge.io in the
+[DOWNLOAD] area, and at http://libpng.download/src . If you
+can't find it in any of those places, e-mail me, and I'll help you find it.
I am not a lawyer, but I believe that the Export Control Classification
Number (ECCN) for libpng is EAR99, which means not subject to export
diff --git a/Build/source/libs/libpng/libpng-src/configure.ac b/Build/source/libs/libpng/libpng-src/configure.ac
index 765a4ad2dc1..706dbf13e3b 100644
--- a/Build/source/libs/libpng/libpng-src/configure.ac
+++ b/Build/source/libs/libpng/libpng-src/configure.ac
@@ -25,7 +25,7 @@ AC_PREREQ([2.68])
dnl Version number stuff here:
-AC_INIT([libpng],[1.6.29],[png-mng-implement@lists.sourceforge.net])
+AC_INIT([libpng],[1.6.30],[png-mng-implement@lists.sourceforge.net])
AC_CONFIG_MACRO_DIR([scripts])
# libpng does not follow GNU file name conventions (hence 'foreign')
@@ -46,10 +46,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.29
+PNGLIB_VERSION=1.6.30
PNGLIB_MAJOR=1
PNGLIB_MINOR=6
-PNGLIB_RELEASE=28
+PNGLIB_RELEASE=30
dnl End of version number stuff
diff --git a/Build/source/libs/libpng/libpng-src/contrib/arm-neon/android-ndk.c b/Build/source/libs/libpng/libpng-src/contrib/arm-neon/android-ndk.c
index 7240123487d..fb3a4898de6 100644
--- a/Build/source/libs/libpng/libpng-src/contrib/arm-neon/android-ndk.c
+++ b/Build/source/libs/libpng/libpng-src/contrib/arm-neon/android-ndk.c
@@ -17,7 +17,7 @@
*
* Documentation:
* http://www.kandroid.org/ndk/docs/CPU-ARM-NEON.html
- * http://code.google.com/p/android/issues/detail?id=49065
+ * https://code.google.com/p/android/issues/detail?id=49065
*
* NOTE: this requires that libpng is built against the Android NDK and linked
* with an implementation of the Android ARM 'cpu-features' library. The code
diff --git a/Build/source/libs/libpng/libpng-src/contrib/examples/pngtopng.c b/Build/source/libs/libpng/libpng-src/contrib/examples/pngtopng.c
index d4a51a8f042..904b972382f 100644
--- a/Build/source/libs/libpng/libpng-src/contrib/examples/pngtopng.c
+++ b/Build/source/libs/libpng/libpng-src/contrib/examples/pngtopng.c
@@ -5,7 +5,7 @@
* related or neighboring rights to this work. This work is published from:
* United States.
*
- * Last changed in libpng 1.6.29 [%RDATE%]
+ * Last changed in libpng 1.6.29 [March 16, 2017]
*
* Read a PNG and write it out in a fixed format, using the 'simplified API'
* that was introduced in libpng-1.6.0.
diff --git a/Build/source/libs/libpng/libpng-src/contrib/gregbook/README b/Build/source/libs/libpng/libpng-src/contrib/gregbook/README
index fd30f058129..90e28f7ce53 100644
--- a/Build/source/libs/libpng/libpng-src/contrib/gregbook/README
+++ b/Build/source/libs/libpng/libpng-src/contrib/gregbook/README
@@ -55,7 +55,7 @@ mation and links to the latest version of the source code, and Chapters
13-15 of the book for detailed discussion of the three programs.
Greg Roelofs
-http://pobox.com/~newt/greg_contact.html
+https://pobox.com/~newt/greg_contact.html
16 March 2008
@@ -63,7 +63,7 @@ BUILD INSTRUCTIONS
- Prerequisites (in order of compilation):
- - zlib http://zlib.net/
+ - zlib https://zlib.net/
- libpng http://www.libpng.org/pub/png/libpng.html
- pngbook http://www.libpng.org/pub/png/book/sources.html
diff --git a/Build/source/libs/libpng/libpng-src/contrib/gregbook/readpng.c b/Build/source/libs/libpng/libpng-src/contrib/gregbook/readpng.c
index 9167403e597..fad9b536ab9 100644
--- a/Build/source/libs/libpng/libpng-src/contrib/gregbook/readpng.c
+++ b/Build/source/libs/libpng/libpng-src/contrib/gregbook/readpng.c
@@ -4,7 +4,7 @@
---------------------------------------------------------------------------
- Copyright (c) 1998-2007 Greg Roelofs. All rights reserved.
+ Copyright (c) 1998-2007,2017 Greg Roelofs. All rights reserved.
This software is provided "as is," without warranty of any kind,
express or implied. In no event shall the author or contributors
@@ -264,6 +264,12 @@ uch *readpng_get_image(double display_exponent, int *pChannels, ulg *pRowbytes)
*pRowbytes = rowbytes = png_get_rowbytes(png_ptr, info_ptr);
*pChannels = (int)png_get_channels(png_ptr, info_ptr);
+ /* Guard against integer overflow */
+ if (height > ((size_t)(-1))/rowbytes) {
+ fprintf(stderr, "readpng: image_data buffer would be too large\n",
+ return NULL;
+ }
+
if ((image_data = (uch *)malloc(rowbytes*height)) == NULL) {
png_destroy_read_struct(&png_ptr, &info_ptr, NULL);
return NULL;
diff --git a/Build/source/libs/libpng/libpng-src/contrib/gregbook/readpng2.c b/Build/source/libs/libpng/libpng-src/contrib/gregbook/readpng2.c
index 4d5e38fe24b..5d13e15300d 100644
--- a/Build/source/libs/libpng/libpng-src/contrib/gregbook/readpng2.c
+++ b/Build/source/libs/libpng/libpng-src/contrib/gregbook/readpng2.c
@@ -55,6 +55,7 @@
Changelog:
2015-11-12 - Check return value of png_get_bKGD() (Glenn R-P)
+ 2017-04-22 - Guard against integer overflow (Glenn R-P)
---------------------------------------------------------------------------*/
diff --git a/Build/source/libs/libpng/libpng-src/contrib/gregbook/readppm.c b/Build/source/libs/libpng/libpng-src/contrib/gregbook/readppm.c
index 7fefc3943ec..52e70277713 100644
--- a/Build/source/libs/libpng/libpng-src/contrib/gregbook/readppm.c
+++ b/Build/source/libs/libpng/libpng-src/contrib/gregbook/readppm.c
@@ -9,7 +9,7 @@
---------------------------------------------------------------------------
- Copyright (c) 1998-2007 Greg Roelofs. All rights reserved.
+ Copyright (c) 1998-2007,2017 Greg Roelofs. All rights reserved.
This software is provided "as is," without warranty of any kind,
express or implied. In no event shall the author or contributors
@@ -154,12 +154,17 @@ uch *readpng_get_image(double display_exponent, int *pChannels, ulg *pRowbytes)
*pRowbytes = rowbytes = channels*width;
*pChannels = channels;
- if ((image_data = (uch *)malloc(rowbytes*height)) == NULL) {
+ Trace((stderr, "readpng_get_image: rowbytes = %ld, height = %ld\n", rowbytes, height));
+
+ /* Guard against integer overflow */
+ if (height > ((size_t)(-1))/rowbytes) {
+ fprintf(stderr, PROGNAME ": image_data buffer would be too large\n",
return NULL;
}
- Trace((stderr, "readpng_get_image: rowbytes = %ld, height = %ld\n", rowbytes, height));
-
+ if ((image_data = (uch *)malloc(rowbytes*height)) == NULL) {
+ return NULL;
+ }
/* now we can go ahead and just read the whole image */
diff --git a/Build/source/libs/libpng/libpng-src/contrib/gregbook/rpng-win.c b/Build/source/libs/libpng/libpng-src/contrib/gregbook/rpng-win.c
index cd554393773..1a6f876154d 100644
--- a/Build/source/libs/libpng/libpng-src/contrib/gregbook/rpng-win.c
+++ b/Build/source/libs/libpng/libpng-src/contrib/gregbook/rpng-win.c
@@ -24,10 +24,11 @@
- 1.10: enabled "message window"/console (thanks to David Geldreich)
- 2.00: dual-licensed (added GNU GPL)
- 2.01: fixed improper display of usage screen on PNG error(s)
+ - 2.02: check for integer overflow (Glenn R-P)
---------------------------------------------------------------------------
- Copyright (c) 1998-2008 Greg Roelofs. All rights reserved.
+ Copyright (c) 1998-2008, 2017 Greg Roelofs. All rights reserved.
This software is provided "as is," without warranty of any kind,
express or implied. In no event shall the author or contributors
@@ -496,6 +497,12 @@ static int rpng_win_create_window(HINSTANCE hInst, int showmode)
wimage_rowbytes = ((3*image_width + 3L) >> 2) << 2;
+ /* Guard against integer overflow */
+ if (image_height > ((size_t)(-1))/wimage_rowbytes) {
+ fprintf(stderr, PROGNAME ": image_data buffer would be too large\n");
+ return 4; /* fail */
+ }
+
if (!(dib = (uch *)malloc(sizeof(BITMAPINFOHEADER) +
wimage_rowbytes*image_height)))
{
diff --git a/Build/source/libs/libpng/libpng-src/contrib/gregbook/rpng-x.c b/Build/source/libs/libpng/libpng-src/contrib/gregbook/rpng-x.c
index ddd7c58d6f3..92effaa6d29 100644
--- a/Build/source/libs/libpng/libpng-src/contrib/gregbook/rpng-x.c
+++ b/Build/source/libs/libpng/libpng-src/contrib/gregbook/rpng-x.c
@@ -28,10 +28,11 @@
- 2.01: fixed improper display of usage screen on PNG error(s)
- 2.02: Added "void(argc);" statement to quiet pedantic compiler warnings
about unused variable (GR-P)
+ - 2.03: check for integer overflow (Glenn R-P)
---------------------------------------------------------------------------
- Copyright (c) 1998-2008 Greg Roelofs. All rights reserved.
+ Copyright (c) 1998-2008, 2017 Greg Roelofs. All rights reserved.
This software is provided "as is," without warranty of any kind,
express or implied. In no event shall the author or contributors
diff --git a/Build/source/libs/libpng/libpng-src/contrib/gregbook/rpng2-win.c b/Build/source/libs/libpng/libpng-src/contrib/gregbook/rpng2-win.c
index c924c1c6c27..ed6b526ecb9 100644
--- a/Build/source/libs/libpng/libpng-src/contrib/gregbook/rpng2-win.c
+++ b/Build/source/libs/libpng/libpng-src/contrib/gregbook/rpng2-win.c
@@ -33,12 +33,11 @@
- 2.02: fixed improper display of usage screen on PNG error(s); fixed
unexpected-EOF and file-read-error cases
- 2.03: removed runtime MMX-enabling/disabling and obsolete -mmx* options
- - 2.04:
- (GR-P)
+ - 2.04: check for integer overflow (Glenn R-P)
---------------------------------------------------------------------------
- Copyright (c) 1998-2008 Greg Roelofs. All rights reserved.
+ Copyright (c) 1998-2008, 2017 Greg Roelofs. All rights reserved.
This software is provided "as is," without warranty of any kind,
express or implied. In no event shall the author or contributors
@@ -650,6 +649,13 @@ static void rpng2_win_init()
Trace((stderr, " width = %ld\n", rpng2_info.width))
Trace((stderr, " height = %ld\n", rpng2_info.height))
+ /* Guard against integer overflow */
+ if (rpng2_info.height > ((size_t)(-1))/rowbytes) {
+ fprintf(stderr, PROGNAME ": image_data buffer would be too large\n",
+ readpng2_cleanup(&rpng2_info);
+ return;
+ }
+
rpng2_info.image_data = (uch *)malloc(rowbytes * rpng2_info.height);
if (!rpng2_info.image_data) {
readpng2_cleanup(&rpng2_info);
diff --git a/Build/source/libs/libpng/libpng-src/contrib/gregbook/rpng2-x.c b/Build/source/libs/libpng/libpng-src/contrib/gregbook/rpng2-x.c
index 0c8ddeba223..af944c0f2bf 100644
--- a/Build/source/libs/libpng/libpng-src/contrib/gregbook/rpng2-x.c
+++ b/Build/source/libs/libpng/libpng-src/contrib/gregbook/rpng2-x.c
@@ -44,9 +44,11 @@
- 2.04: Added "void(foo);" statements to quiet pedantic compiler warnings
about unused variables (GR-P)
- 2.05: Use nanosleep() instead of usleep(), which is deprecated (GR-P).
+ - 2.06: check for integer overflow (Glenn R-P)
---------------------------------------------------------------------------
- Copyright (c) 1998-2010, 2014-2015 Greg Roelofs. All rights reserved.
+ Copyright (c) 1998-2010, 2014-2015, 2017 Greg Roelofs. All rights
+ reserved.
This software is provided "as is," without warranty of any kind,
express or implied. In no event shall the author or contributors
@@ -780,6 +782,13 @@ static void rpng2_x_init(void)
Trace((stderr, " width = %ld\n", rpng2_info.width))
Trace((stderr, " height = %ld\n", rpng2_info.height))
+ /* Guard against integer overflow */
+ if (rpng2_info.height > ((size_t)(-1))/rpng2_info.rowbytes) {
+ fprintf(stderr, PROGNAME ": image_data buffer would be too large\n");
+ readpng2_cleanup(&rpng2_info);
+ return;
+ }
+
rpng2_info.image_data = (uch *)malloc(rowbytes * rpng2_info.height);
if (!rpng2_info.image_data) {
readpng2_cleanup(&rpng2_info);
diff --git a/Build/source/libs/libpng/libpng-src/contrib/gregbook/wpng.c b/Build/source/libs/libpng/libpng-src/contrib/gregbook/wpng.c
index a06e3529ecb..a8f367fb84a 100644
--- a/Build/source/libs/libpng/libpng-src/contrib/gregbook/wpng.c
+++ b/Build/source/libs/libpng/libpng-src/contrib/gregbook/wpng.c
@@ -29,6 +29,7 @@
- 1.04: fixed DOS/OS2/Win32 detection, including partial Cygwin fix
(see http://home.att.net/~perlspinr/diffs/GregBook_cygwin.diff)
- 2.00: dual-licensed (added GNU GPL)
+ - 2.01: check for integer overflow (Glenn R-P)
[REPORTED BUG (win32 only): "contrib/gregbook/wpng.c - cmd line
dose not work! In order to do something useful I needed to redirect
@@ -38,7 +39,7 @@
---------------------------------------------------------------------------
- Copyright (c) 1998-2007 Greg Roelofs. All rights reserved.
+ Copyright (c) 1998-2007, 2017 Greg Roelofs. All rights reserved.
This software is provided "as is," without warranty of any kind,
express or implied. In no event shall the author or contributors
@@ -702,7 +703,18 @@ int main(int argc, char **argv)
if (wpng_info.interlaced) {
long i;
ulg bytes;
- ulg image_bytes = rowbytes * wpng_info.height; /* overflow? */
+ ulg image_bytes;
+
+ /* Guard against integer overflow */
+ if (wpng_info_height > ((size_t)(-1)/rowbytes ||
+ wpng_info_height > ((ulg)(-1)/rowbytes) {
+ fprintf(stderr, PROGNAME ": image_data buffer too large\n");
+ writepng_cleanup(&wpng_info);
+ wpng_cleanup();
+ exit(5);
+ }
+
+ image_bytes = rowbytes * wpng_info.height;
wpng_info.image_data = (uch *)malloc(image_bytes);
wpng_info.row_pointers = (uch **)malloc(wpng_info.height*sizeof(uch *));
diff --git a/Build/source/libs/libpng/libpng-src/contrib/gregbook/writepng.c b/Build/source/libs/libpng/libpng-src/contrib/gregbook/writepng.c
index c5c9534797b..055c74374a6 100644
--- a/Build/source/libs/libpng/libpng-src/contrib/gregbook/writepng.c
+++ b/Build/source/libs/libpng/libpng-src/contrib/gregbook/writepng.c
@@ -4,7 +4,7 @@
---------------------------------------------------------------------------
- Copyright (c) 1998-2007 Greg Roelofs. All rights reserved.
+ Copyright (c) 1998-2007, 2017 Greg Roelofs. All rights reserved.
This software is provided "as is," without warranty of any kind,
express or implied. In no event shall the author or contributors
diff --git a/Build/source/libs/libpng/libpng-src/contrib/pngminus/png2pnm.c b/Build/source/libs/libpng/libpng-src/contrib/pngminus/png2pnm.c
index 995fddf3785..c9f16237d98 100644
--- a/Build/source/libs/libpng/libpng-src/contrib/pngminus/png2pnm.c
+++ b/Build/source/libs/libpng/libpng-src/contrib/pngminus/png2pnm.c
@@ -3,6 +3,7 @@
* copyright (C) 1999 by Willem van Schaik <willem at schaik.com>
*
* version 1.0 - 1999.10.15 - First version.
+ * 1.1 - 2017.04.22 - Add buffer-size check (Glenn Randers-Pehrson)
*
* Permission to use, copy, modify, and distribute this software and
* its documentation for any purpose and without fee is hereby granted,
@@ -320,6 +321,10 @@ BOOL png2pnm (FILE *png_file, FILE *pnm_file, FILE *alpha_file,
/* row_bytes is the width x number of channels x (bit-depth / 8) */
row_bytes = png_get_rowbytes (png_ptr, info_ptr);
+ if (height > ((size_t)(-1))/row_bytes) /* too big */ {
+ png_destroy_read_struct (&png_ptr, &info_ptr, NULL);
+ return FALSE;
+ }
if ((png_pixels = (png_byte *)
malloc (row_bytes * height * sizeof (png_byte))) == NULL) {
png_destroy_read_struct (&png_ptr, &info_ptr, NULL);
diff --git a/Build/source/libs/libpng/libpng-src/contrib/pngminus/pnm2png.c b/Build/source/libs/libpng/libpng-src/contrib/pngminus/pnm2png.c
index 5de828a74d5..adc32069d05 100644
--- a/Build/source/libs/libpng/libpng-src/contrib/pngminus/pnm2png.c
+++ b/Build/source/libs/libpng/libpng-src/contrib/pngminus/pnm2png.c
@@ -4,6 +4,7 @@
*
* version 1.0 - 1999.10.15 - First version.
* version 1.1 - 2015.07.29 - Fixed leaks (Glenn Randers-Pehrson)
+ * version 1.2 - 2017.04.22 - Add buffer-size check
*
* Permission to use, copy, modify, and distribute this software and
* its documentation for any purpose and without fee is hereby granted,
@@ -373,6 +374,9 @@ BOOL pnm2png (FILE *pnm_file, FILE *png_file, FILE *alpha_file, BOOL interlace,
/* row_bytes is the width x number of channels x (bit-depth / 8) */
row_bytes = width * channels * ((bit_depth <= 8) ? 1 : 2);
+ if (height > ((size_t)(-1))/row_bytes) /* too big */ {
+ return FALSE;
+ }
if ((png_pixels = (png_byte *)
malloc (row_bytes * height * sizeof (png_byte))) == NULL)
return FALSE;
diff --git a/Build/source/libs/libpng/libpng-src/contrib/tools/genpng.c b/Build/source/libs/libpng/libpng-src/contrib/tools/genpng.c
index ce43260cb4c..0b3f9819645 100644
--- a/Build/source/libs/libpng/libpng-src/contrib/tools/genpng.c
+++ b/Build/source/libs/libpng/libpng-src/contrib/tools/genpng.c
@@ -1,7 +1,8 @@
/*- genpng
*
* COPYRIGHT: Written by John Cunningham Bowler, 2015.
- * To the extent possible under law, the author has waived all copyright and
+ * Revised by Glenn Randers-Pehrson, 2017, to add buffer-size check.
+ * To the extent possible under law, the authors have waived all copyright and
* related or neighboring rights to this work. This work is published from:
* United States.
*
@@ -783,6 +784,19 @@ main(int argc, const char **argv)
return 1;
}
+#if 1
+ /* TO do: determine whether this guard against overflow is necessary.
+ * This comment in png.h indicates that it should be safe: "libpng will
+ * refuse to process an image where such an overflow would occur", but
+ * I don't see where the image gets rejected when the buffer is too
+ * large before the malloc is attempted.
+ */
+ if (image.height > ((size_t)(-1))/(8*image.width)) {
+ fprintf(stderr, "genpng: image buffer would be too big");
+ return 1;
+ }
+#endif
+
/* Create the buffer: */
buffer = malloc(PNG_IMAGE_SIZE(image));
diff --git a/Build/source/libs/libpng/libpng-src/contrib/tools/sRGB.h b/Build/source/libs/libpng/libpng-src/contrib/tools/sRGB.h
index 22c8f7c0e3d..d1ece51291d 100644
--- a/Build/source/libs/libpng/libpng-src/contrib/tools/sRGB.h
+++ b/Build/source/libs/libpng/libpng-src/contrib/tools/sRGB.h
@@ -14,7 +14,7 @@
* All routines take and return a floating point value in the range
* 0 to 1.0, doing a calculation according to the sRGB specification
* (in fact the source of the numbers is the wikipedia article at
- * http://en.wikipedia.org/wiki/SRGB).
+ * https://en.wikipedia.org/wiki/SRGB).
*/
static double
sRGB_from_linear(double l)
diff --git a/Build/source/libs/libpng/libpng-src/contrib/visupng/PngFile.c b/Build/source/libs/libpng/libpng-src/contrib/visupng/PngFile.c
index dcde18a3af4..d46318f4474 100644
--- a/Build/source/libs/libpng/libpng-src/contrib/visupng/PngFile.c
+++ b/Build/source/libs/libpng/libpng-src/contrib/visupng/PngFile.c
@@ -2,7 +2,7 @@
* PNGFILE.C -- Image File Functions
*-------------------------------------
*
- * Copyright 2000, Willem van Schaik.
+ * Copyright 2000,2017 Willem van Schaik.
*
* This code is released under the libpng license.
* For conditions of distribution and use, see the disclaimer
@@ -236,6 +236,10 @@ BOOL PngLoadImage (PTSTR pstrFileName, png_byte **ppbImageData,
free (pbImageData);
pbImageData = NULL;
}
+ if ((*piHeight) > ((size_t)(-1))/ulRowBytes) {
+ {
+ png_error(png_ptr, "Visual PNG: image is too big");
+ }
if ((pbImageData = (png_byte *) malloc(ulRowBytes * (*piHeight)
* sizeof(png_byte))) == NULL)
{
diff --git a/Build/source/libs/libpng/libpng-src/contrib/visupng/VisualPng.c b/Build/source/libs/libpng/libpng-src/contrib/visupng/VisualPng.c
index 236525a59fe..20e1625fa7d 100644
--- a/Build/source/libs/libpng/libpng-src/contrib/visupng/VisualPng.c
+++ b/Build/source/libs/libpng/libpng-src/contrib/visupng/VisualPng.c
@@ -2,7 +2,7 @@
* VisualPng.C -- Shows a PNG image
*------------------------------------
*
- * Copyright 2000, Willem van Schaik.
+ * Copyright 2000,2017 Willem van Schaik.
*
* This code is released under the libpng license.
* For conditions of distribution and use, see the disclaimer
@@ -726,6 +726,10 @@ BOOL DisplayImage (HWND hwnd, BYTE **ppDib,
pDib = NULL;
}
+ if (cyWinSize > ((size_t)(-1))/wDIRowBytes) {
+ {
+ MessageBox (hwnd, TEXT ("Visual PNG: image is too big");
+ }
if (!(pDib = (BYTE *) malloc (sizeof(BITMAPINFOHEADER) +
wDIRowBytes * cyWinSize)))
{
@@ -847,6 +851,10 @@ BOOL FillBitmap (
cxImgPos = (cxWinSize - cxNewSize) / 2;
}
+ if (cyNewSize > ((size_t)(-1))/(cImgChannels * cxNewSize)) {
+ {
+ MessageBox (hwnd, TEXT ("Visual PNG: stretched image is too big");
+ }
pStretchedImage = malloc (cImgChannels * cxNewSize * cyNewSize);
pImg = pStretchedImage;
diff --git a/Build/source/libs/libpng/libpng-src/example.c b/Build/source/libs/libpng/libpng-src/example.c
index edc8ba2d96e..a71000fa08f 100644
--- a/Build/source/libs/libpng/libpng-src/example.c
+++ b/Build/source/libs/libpng/libpng-src/example.c
@@ -983,6 +983,11 @@ void write_png(char *file_name /* , ... other image information ... */)
png_uint_32 k, height, width;
/* In this example, "image" is a one-dimensional array of bytes */
+
+ /* Guard against integer overflow */
+ if (height > PNG_SIZE_MAX/(width*bytes_per_pixel)) {
+ png_error(png_ptr, "Image_data buffer would be too large");
+ }
png_byte image[height*width*bytes_per_pixel];
png_bytep row_pointers[height];
diff --git a/Build/source/libs/libpng/libpng-src/libpng-manual.txt b/Build/source/libs/libpng/libpng-src/libpng-manual.txt
index 57ebbda4c8b..6cde89ab024 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.29 - March 16, 2017
+ libpng version 1.6.30 - June 28, 2017
Updated and distributed by Glenn Randers-Pehrson
<glennrp at users.sourceforge.net>
- Copyright (c) 1998-2016 Glenn Randers-Pehrson
+ Copyright (c) 1998-2017 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.29 - March 16, 2017
+ libpng versions 0.97, January 1998, through 1.6.30 - June 28, 2017
Updated and distributed by Glenn Randers-Pehrson
- Copyright (c) 1998-2016 Glenn Randers-Pehrson
+ Copyright (c) 1998-2017 Glenn Randers-Pehrson
libpng 1.0 beta 6 - version 0.96 - May 28, 1997
Updated and distributed by Andreas Dilger
@@ -66,17 +66,17 @@ file format in application programs.
The PNG specification (second edition), November 2003, is available as
a W3C Recommendation and as an ISO Standard (ISO/IEC 15948:2004 (E)) at
-<http://www.w3.org/TR/2003/REC-PNG-20031110/
+<https://www.w3.org/TR/2003/REC-PNG-20031110/
The W3C and ISO documents have identical technical content.
The PNG-1.2 specification is available at
-<http://png-mng.sourceforge.net/pub/png/spec/1.2/>.
+<https://png-mng.sourceforge.io/pub/png/spec/1.2/>.
It is technically equivalent
to the PNG specification (second edition) but has some additional material.
-The PNG-1.0 specification is available as RFC 2083
-<http://png-mng.sourceforge.net/pub/png/spec/1.0/> and as a
-W3C Recommendation <http://www.w3.org/TR/REC-png-961001>.
+The PNG-1.0 specification is available as RFC 2083
+<https://png-mng.sourceforge.io/pub/png/spec/1.0/> and as a
+W3C Recommendation <https://www.w3.org/TR/REC-png-961001>.
Some additional chunks are described in the special-purpose public chunks
documents at <http://www.libpng.org/pub/png/spec/register/>
@@ -101,7 +101,7 @@ majority of the needs of its users.
Libpng uses zlib for its compression and decompression of PNG files.
Further information about zlib, and the latest version of zlib, can
-be found at the zlib home page, <http://zlib.net/>.
+be found at the zlib home page, <https://zlib.net/>.
The zlib compression utility is a general purpose utility that is
useful for more than PNG files, and can be used without libpng.
See the documentation delivered with zlib for more details.
@@ -1190,7 +1190,20 @@ row_pointers prior to calling png_read_png() with
png_set_rows(png_ptr, info_ptr, &row_pointers);
Alternatively you could allocate your image in one big block and define
-row_pointers[i] to point into the proper places in your block.
+row_pointers[i] to point into the proper places in your block, but first
+be sure that your platform is able to allocate such a large buffer:
+
+ /* Guard against integer overflow */
+ if (height > PNG_SIZE_MAX/(width*pixel_size)) {
+ png_error(png_ptr,"image_data buffer would be too large");
+ }
+
+ png_bytep buffer=png_malloc(png_ptr,height*width*pixel_size);
+
+ for (int i=0; i<height, i++)
+ row_pointers[i]=buffer+i*width*pixel_size;
+
+ png_set_rows(png_ptr, info_ptr, &row_pointers);
If you use png_set_rows(), the application is responsible for freeing
row_pointers (and row_pointers[i], if they were separately allocated).
@@ -2146,6 +2159,16 @@ are allocating one large chunk, you will need to build an
array of pointers to each row, as it will be needed for some
of the functions below.
+Be sure that your platform can allocate the buffer that you'll need.
+libpng internally checks for oversize width, but you'll need to
+do your own check for number_of_rows*width*pixel_size if you are using
+a multiple-row buffer:
+
+ /* Guard against integer overflow */
+ if (number_of_rows > PNG_SIZE_MAX/(width*pixel_size)) {
+ png_error(png_ptr,"image_data buffer would be too large");
+ }
+
Remember: Before you call png_read_update_info(), the png_get_*()
functions return the values corresponding to the original PNG image.
After you call png_read_update_info the values refer to the image
@@ -3824,7 +3847,7 @@ PNG_FORMAT_FLAG_LINEAR flag below.
When the simplified API needs to convert between sRGB and linear colorspaces,
the actual sRGB transfer curve defined in the sRGB specification (see the
-article at http://en.wikipedia.org/wiki/SRGB) is used, not the gamma=1/2.2
+article at https://en.wikipedia.org/wiki/SRGB) is used, not the gamma=1/2.2
approximation used elsewhere in libpng.
When an alpha channel is present it is expected to denote pixel coverage
@@ -4088,7 +4111,7 @@ READ APIs
When the simplified API needs to convert between sRGB and linear colorspaces,
the actual sRGB transfer curve defined in the sRGB specification (see the
-article at http://en.wikipedia.org/wiki/SRGB) is used, not the gamma=1/2.2
+article at https://en.wikipedia.org/wiki/SRGB) is used, not the gamma=1/2.2
approximation used elsewhere in libpng.
WRITE APIS
@@ -4246,8 +4269,6 @@ functions after png_create_*_struct() has been called by calling:
png_voidp error_ptr, png_error_ptr error_fn,
png_error_ptr warning_fn);
- png_voidp error_ptr = png_get_error_ptr(png_ptr);
-
If NULL is supplied for either error_fn or warning_fn, then the libpng
default function will be used, calling fprintf() and/or longjmp() if a
problem is encountered. The replacement error functions should have
@@ -4259,6 +4280,11 @@ parameters as follows:
void user_warning_fn(png_structp png_ptr,
png_const_charp warning_msg);
+Then, within your user_error_fn or user_warning_fn, you can retrieve
+the error_ptr if you need it, by calling
+
+ png_voidp error_ptr = png_get_error_ptr(png_ptr);
+
The motivation behind using setjmp() and longjmp() is the C++ throw and
catch exception handling methods. This makes the code much easier to write,
as there is no need to check every return code of every function call.
@@ -4266,7 +4292,7 @@ However, there are some uncertainties about the status of local variables
after a longjmp, so the user may want to be careful about doing anything
after setjmp returns non-zero besides returning itself. Consult your
compiler documentation for more details. For an alternative approach, you
-may wish to use the "cexcept" facility (see http://cexcept.sourceforge.net),
+may wish to use the "cexcept" facility (see https://cexcept.sourceforge.io/),
which is illustrated in pngvalid.c and in contrib/visupng.
Beginning in libpng-1.4.0, the png_set_benign_errors() API became available.
@@ -4494,7 +4520,7 @@ in a MNG datastream. As a minimum, it must have the MNG 8-byte signature
and the MHDR and MEND chunks. Libpng does not provide support for these
or any other MNG chunks; your application must provide its own support for
them. You may wish to consider using libmng (available at
-http://www.libmng.com) instead.
+https://www.libmng.com/) instead.
VIII. Changes to Libpng from version 0.88
@@ -4917,18 +4943,14 @@ PNG_USER_WIDTH_MAX and PNG_USER_HEIGHT_MAX, although this document said
that it could be used to override them. Now this function will reduce or
increase the limits.
-Starting in libpng-1.5.10, the user limits can be set en masse with the
-configuration option PNG_SAFE_LIMITS_SUPPORTED. If this option is enabled,
-a set of "safe" limits is applied in pngpriv.h. These can be overridden by
-application calls to png_set_user_limits(), png_set_user_chunk_cache_max(),
-and/or png_set_user_malloc_max() that increase or decrease the limits. Also,
-in libpng-1.5.10 the default width and height limits were increased
-from 1,000,000 to 0x7fffffff (i.e., made unlimited). Therefore, the
-limits are now
- default safe
+Starting in libpng-1.5.22, default user limits were established. These
+can be overridden by application calls to png_set_user_limits(),
+png_set_user_chunk_cache_max(), and/or png_set_user_malloc_max().
+The limits are now
+ max possible default
png_user_width_max 0x7fffffff 1,000,000
png_user_height_max 0x7fffffff 1,000,000
- png_user_chunk_cache_max 0 (unlimited) 128
+ png_user_chunk_cache_max 0 (unlimited) 1000
png_user_chunk_malloc_max 0 (unlimited) 8,000,000
The png_set_option() function (and the "options" member of the png struct) was
@@ -5194,27 +5216,33 @@ control. The git repository was built from old libpng-x.y.z.tar.gz files
going back to version 0.70. You can access the git repository (read only)
at
- git://git.code.sf.net/p/libpng/code
+ https://github.com/glennrp/libpng or
+ https://git.code.sf.net/p/libpng/code.git
-or you can browse it with a web browser by selecting the "code" button at
+or you can browse it with a web browser at
- https://sourceforge.net/projects/libpng
+ https://github.com/glennrp/libpng or
+ https://sourceforge.net/p/libpng/code/ci/libpng16/tree/
Patches can be sent to glennrp at users.sourceforge.net or to
png-mng-implement at lists.sourceforge.net or you can upload them to
the libpng bug tracker at
- http://libpng.sourceforge.net
+ https://libpng.sourceforge.io/
+
+or as a "pull request" to
+
+ https://github.com/glennrp/libpng/pulls
We also accept patches built from the tar or zip distributions, and
simple verbal discriptions of bug fixes, reported either to the
SourceForge bug tracker, to the png-mng-implement at lists.sf.net
-mailing list, or directly to glennrp.
+mailing list, as github issues, or directly to glennrp.
XV. Coding style
Our coding style is similar to the "Allman" style
-(See http://en.wikipedia.org/wiki/Indent_style#Allman_style), with curly
+(See https://en.wikipedia.org/wiki/Indent_style#Allman_style), with curly
braces on separate lines:
if (condition)
@@ -5315,7 +5343,7 @@ Prior to libpng-1.6.0 we used a "png_sizeof()" macro, formatted as
though it were a function.
Control keywords if, for, while, and switch are always followed by a space
-to distinguish them from function calls, which have no trailing space.
+to distinguish them from function calls, which have no trailing space.
We put a space after each comma and after each semicolon
in "for" statements, and we put spaces before and after each
@@ -5341,7 +5369,7 @@ for a few type names that we inherit from zlib.h.
We prefer "if (something != 0)" and "if (something == 0)" over
"if (something)" and if "(!something)", respectively, and for pointers
-we prefer "if (some_pointer != NULL)" or "if (some_pointer == NULL)".
+we prefer "if (some_pointer != NULL)" or "if (some_pointer == NULL)".
We do not use the TAB character for indentation in the C sources.
@@ -5355,7 +5383,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.29 are Y2K compliant. It is my belief that earlier
+upward through 1.6.30 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 080dfe523af..12eb2e2de53 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 "March 16, 2017"
+.TH LIBPNG 3 "June 28, 2017"
.SH NAME
-libpng \- Portable Network Graphics (PNG) Reference Library 1.6.29
+libpng \- Portable Network Graphics (PNG) Reference Library 1.6.30
.SH SYNOPSIS
\fB
#include <png.h>\fP
@@ -510,10 +510,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.29 - March 16, 2017
+ libpng version 1.6.30 - June 28, 2017
Updated and distributed by Glenn Randers-Pehrson
<glennrp at users.sourceforge.net>
- Copyright (c) 1998-2016 Glenn Randers-Pehrson
+ Copyright (c) 1998-2017 Glenn Randers-Pehrson
This document is released under the libpng license.
For conditions of distribution and use, see the disclaimer
@@ -521,9 +521,9 @@ libpng-manual.txt - A description on how to use and modify libpng
Based on:
- libpng versions 0.97, January 1998, through 1.6.29 - March 16, 2017
+ libpng versions 0.97, January 1998, through 1.6.30 - June 28, 2017
Updated and distributed by Glenn Randers-Pehrson
- Copyright (c) 1998-2016 Glenn Randers-Pehrson
+ Copyright (c) 1998-2017 Glenn Randers-Pehrson
libpng 1.0 beta 6 - version 0.96 - May 28, 1997
Updated and distributed by Andreas Dilger
@@ -576,17 +576,17 @@ file format in application programs.
The PNG specification (second edition), November 2003, is available as
a W3C Recommendation and as an ISO Standard (ISO/IEC 15948:2004 (E)) at
-<http://www.w3.org/TR/2003/REC-PNG-20031110/
+<https://www.w3.org/TR/2003/REC-PNG-20031110/
The W3C and ISO documents have identical technical content.
The PNG-1.2 specification is available at
-<http://png-mng.sourceforge.net/pub/png/spec/1.2/>.
+<https://png-mng.sourceforge.io/pub/png/spec/1.2/>.
It is technically equivalent
to the PNG specification (second edition) but has some additional material.
-The PNG-1.0 specification is available as RFC 2083
-<http://png-mng.sourceforge.net/pub/png/spec/1.0/> and as a
-W3C Recommendation <http://www.w3.org/TR/REC-png-961001>.
+The PNG-1.0 specification is available as RFC 2083
+<https://png-mng.sourceforge.io/pub/png/spec/1.0/> and as a
+W3C Recommendation <https://www.w3.org/TR/REC-png-961001>.
Some additional chunks are described in the special-purpose public chunks
documents at <http://www.libpng.org/pub/png/spec/register/>
@@ -611,7 +611,7 @@ majority of the needs of its users.
Libpng uses zlib for its compression and decompression of PNG files.
Further information about zlib, and the latest version of zlib, can
-be found at the zlib home page, <http://zlib.net/>.
+be found at the zlib home page, <https://zlib.net/>.
The zlib compression utility is a general purpose utility that is
useful for more than PNG files, and can be used without libpng.
See the documentation delivered with zlib for more details.
@@ -1700,7 +1700,20 @@ row_pointers prior to calling png_read_png() with
png_set_rows(png_ptr, info_ptr, &row_pointers);
Alternatively you could allocate your image in one big block and define
-row_pointers[i] to point into the proper places in your block.
+row_pointers[i] to point into the proper places in your block, but first
+be sure that your platform is able to allocate such a large buffer:
+
+ /* Guard against integer overflow */
+ if (height > PNG_SIZE_MAX/(width*pixel_size)) {
+ png_error(png_ptr,"image_data buffer would be too large");
+ }
+
+ png_bytep buffer=png_malloc(png_ptr,height*width*pixel_size);
+
+ for (int i=0; i<height, i++)
+ row_pointers[i]=buffer+i*width*pixel_size;
+
+ png_set_rows(png_ptr, info_ptr, &row_pointers);
If you use png_set_rows(), the application is responsible for freeing
row_pointers (and row_pointers[i], if they were separately allocated).
@@ -2656,6 +2669,16 @@ are allocating one large chunk, you will need to build an
array of pointers to each row, as it will be needed for some
of the functions below.
+Be sure that your platform can allocate the buffer that you'll need.
+libpng internally checks for oversize width, but you'll need to
+do your own check for number_of_rows*width*pixel_size if you are using
+a multiple-row buffer:
+
+ /* Guard against integer overflow */
+ if (number_of_rows > PNG_SIZE_MAX/(width*pixel_size)) {
+ png_error(png_ptr,"image_data buffer would be too large");
+ }
+
Remember: Before you call png_read_update_info(), the png_get_*()
functions return the values corresponding to the original PNG image.
After you call png_read_update_info the values refer to the image
@@ -4334,7 +4357,7 @@ PNG_FORMAT_FLAG_LINEAR flag below.
When the simplified API needs to convert between sRGB and linear colorspaces,
the actual sRGB transfer curve defined in the sRGB specification (see the
-article at http://en.wikipedia.org/wiki/SRGB) is used, not the gamma=1/2.2
+article at https://en.wikipedia.org/wiki/SRGB) is used, not the gamma=1/2.2
approximation used elsewhere in libpng.
When an alpha channel is present it is expected to denote pixel coverage
@@ -4598,7 +4621,7 @@ READ APIs
When the simplified API needs to convert between sRGB and linear colorspaces,
the actual sRGB transfer curve defined in the sRGB specification (see the
-article at http://en.wikipedia.org/wiki/SRGB) is used, not the gamma=1/2.2
+article at https://en.wikipedia.org/wiki/SRGB) is used, not the gamma=1/2.2
approximation used elsewhere in libpng.
WRITE APIS
@@ -4756,8 +4779,6 @@ functions after png_create_*_struct() has been called by calling:
png_voidp error_ptr, png_error_ptr error_fn,
png_error_ptr warning_fn);
- png_voidp error_ptr = png_get_error_ptr(png_ptr);
-
If NULL is supplied for either error_fn or warning_fn, then the libpng
default function will be used, calling fprintf() and/or longjmp() if a
problem is encountered. The replacement error functions should have
@@ -4769,6 +4790,11 @@ parameters as follows:
void user_warning_fn(png_structp png_ptr,
png_const_charp warning_msg);
+Then, within your user_error_fn or user_warning_fn, you can retrieve
+the error_ptr if you need it, by calling
+
+ png_voidp error_ptr = png_get_error_ptr(png_ptr);
+
The motivation behind using setjmp() and longjmp() is the C++ throw and
catch exception handling methods. This makes the code much easier to write,
as there is no need to check every return code of every function call.
@@ -4776,7 +4802,7 @@ However, there are some uncertainties about the status of local variables
after a longjmp, so the user may want to be careful about doing anything
after setjmp returns non-zero besides returning itself. Consult your
compiler documentation for more details. For an alternative approach, you
-may wish to use the "cexcept" facility (see http://cexcept.sourceforge.net),
+may wish to use the "cexcept" facility (see https://cexcept.sourceforge.io/),
which is illustrated in pngvalid.c and in contrib/visupng.
Beginning in libpng-1.4.0, the png_set_benign_errors() API became available.
@@ -5004,7 +5030,7 @@ in a MNG datastream. As a minimum, it must have the MNG 8-byte signature
and the MHDR and MEND chunks. Libpng does not provide support for these
or any other MNG chunks; your application must provide its own support for
them. You may wish to consider using libmng (available at
-http://www.libmng.com) instead.
+https://www.libmng.com/) instead.
.SH VIII. Changes to Libpng from version 0.88
@@ -5427,18 +5453,14 @@ PNG_USER_WIDTH_MAX and PNG_USER_HEIGHT_MAX, although this document said
that it could be used to override them. Now this function will reduce or
increase the limits.
-Starting in libpng-1.5.10, the user limits can be set en masse with the
-configuration option PNG_SAFE_LIMITS_SUPPORTED. If this option is enabled,
-a set of "safe" limits is applied in pngpriv.h. These can be overridden by
-application calls to png_set_user_limits(), png_set_user_chunk_cache_max(),
-and/or png_set_user_malloc_max() that increase or decrease the limits. Also,
-in libpng-1.5.10 the default width and height limits were increased
-from 1,000,000 to 0x7fffffff (i.e., made unlimited). Therefore, the
-limits are now
- default safe
+Starting in libpng-1.5.22, default user limits were established. These
+can be overridden by application calls to png_set_user_limits(),
+png_set_user_chunk_cache_max(), and/or png_set_user_malloc_max().
+The limits are now
+ max possible default
png_user_width_max 0x7fffffff 1,000,000
png_user_height_max 0x7fffffff 1,000,000
- png_user_chunk_cache_max 0 (unlimited) 128
+ png_user_chunk_cache_max 0 (unlimited) 1000
png_user_chunk_malloc_max 0 (unlimited) 8,000,000
The png_set_option() function (and the "options" member of the png struct) was
@@ -5704,27 +5726,33 @@ control. The git repository was built from old libpng-x.y.z.tar.gz files
going back to version 0.70. You can access the git repository (read only)
at
- git://git.code.sf.net/p/libpng/code
+ https://github.com/glennrp/libpng or
+ https://git.code.sf.net/p/libpng/code.git
-or you can browse it with a web browser by selecting the "code" button at
+or you can browse it with a web browser at
- https://sourceforge.net/projects/libpng
+ https://github.com/glennrp/libpng or
+ https://sourceforge.net/p/libpng/code/ci/libpng16/tree/
Patches can be sent to glennrp at users.sourceforge.net or to
png-mng-implement at lists.sourceforge.net or you can upload them to
the libpng bug tracker at
- http://libpng.sourceforge.net
+ https://libpng.sourceforge.io/
+
+or as a "pull request" to
+
+ https://github.com/glennrp/libpng/pulls
We also accept patches built from the tar or zip distributions, and
simple verbal discriptions of bug fixes, reported either to the
SourceForge bug tracker, to the png-mng-implement at lists.sf.net
-mailing list, or directly to glennrp.
+mailing list, as github issues, or directly to glennrp.
.SH XV. Coding style
Our coding style is similar to the "Allman" style
-(See http://en.wikipedia.org/wiki/Indent_style#Allman_style), with curly
+(See https://en.wikipedia.org/wiki/Indent_style#Allman_style), with curly
braces on separate lines:
if (condition)
@@ -5825,7 +5853,7 @@ Prior to libpng-1.6.0 we used a "png_sizeof()" macro, formatted as
though it were a function.
Control keywords if, for, while, and switch are always followed by a space
-to distinguish them from function calls, which have no trailing space.
+to distinguish them from function calls, which have no trailing space.
We put a space after each comma and after each semicolon
in "for" statements, and we put spaces before and after each
@@ -5851,7 +5879,7 @@ for a few type names that we inherit from zlib.h.
We prefer "if (something != 0)" and "if (something == 0)" over
"if (something)" and if "(!something)", respectively, and for pointers
-we prefer "if (some_pointer != NULL)" or "if (some_pointer == NULL)".
+we prefer "if (some_pointer != NULL)" or "if (some_pointer == NULL)".
We do not use the TAB character for indentation in the C sources.
@@ -5865,7 +5893,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.29 are Y2K compliant. It is my belief that earlier
+upward through 1.6.30 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
@@ -5967,7 +5995,7 @@ the first widely used release:
...
1.5.28 15 10528 15.so.15.28[.0]
...
- 1.6.29 16 10629 16.so.16.29[.0]
+ 1.6.30 16 10630 16.so.16.30[.0]
Henceforth the source version will match the shared-library minor
and patch numbers; the shared-library major version number will be
@@ -5984,7 +6012,7 @@ release number plus "betaNN" or "rcNN".
.LP
.IR libpng :
.IP
-http://libpng.sourceforge.net (follow the [DOWNLOAD] link)
+https://libpng.sourceforge.io/ (follow the [DOWNLOAD] link)
http://www.libpng.org/pub/png
.LP
@@ -5994,7 +6022,7 @@ http://www.libpng.org/pub/png
.I libpng
or at
.br
-ftp://ftp.info-zip.org/pub/infozip/zlib
+https://zlib.net/
.LP
.IR PNG specification: RFC 2083
@@ -6003,11 +6031,11 @@ ftp://ftp.info-zip.org/pub/infozip/zlib
.I libpng
or at
.br
-ftp://ftp.rfc-editor.org:/in-notes/rfc2083.txt
+https://www.ietf.org/rfc/rfc2083.txt
.br
or (as a W3C Recommendation) at
.br
-http://www.w3.org/TR/REC-png.html
+https://www.w3.org/TR/REC-png.html
.LP
In the case of any inconsistency between the PNG specification
@@ -6023,7 +6051,7 @@ possible without all of you.
Thanks to Frank J. T. Wojcik for helping with the documentation.
-Libpng version 1.6.29 - March 16, 2017:
+Libpng version 1.6.30 - June 28, 2017:
Initially created in 1995 by Guy Eric Schalnat, then of Group 42, Inc.
Currently maintained by Glenn Randers-Pehrson (glennrp at users.sourceforge.net).
@@ -6048,7 +6076,7 @@ this sentence.
This code is released under the libpng license.
-libpng versions 1.0.7, July 1, 2000 through 1.6.29, March 16, 2017 are
+libpng versions 1.0.7, July 1, 2000 through 1.6.30, June 28, 2017 are
Copyright (c) 2000-2002, 2004, 2006-2017 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
@@ -6176,7 +6204,7 @@ files "pngbar.png" and "pngbar.jpg (88x31) and "pngnow.png" (98x31).
Glenn Randers-Pehrson
glennrp at users.sourceforge.net
-March 16, 2017
+June 28, 2017
.\" 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 04e4b3b4708..c7ae9ed0451 100644
--- a/Build/source/libs/libpng/libpng-src/libpngpf.3
+++ b/Build/source/libs/libpng/libpng-src/libpngpf.3
@@ -1,11 +1,11 @@
-.TH LIBPNGPF 3 "March 16, 2017"
+.TH LIBPNGPF 3 "April 1, 2017"
.SH NAME
-libpng \- Portable Network Graphics (PNG) Reference Library 1.6.29
+libpng \- Portable Network Graphics (PNG) Reference Library 1.6.30
(private functions)
.SH SYNOPSIS
-\fB#include \fI"pngpriv.h"
+\fB\fB#include \fI\fI"pngpriv.h"
-\fBAs of libpng version \fP\fI1.5.1\fP\fB, this section is no longer \fP\fImaintained\fP\fB, now that the private function prototypes are hidden in pngpriv.h and not accessible to applications. Look in pngpriv.h for the prototypes and a short description of each \fIfunction.
+\fB\fBAs of libpng version \fP\fI\fP\fI1.5.1\fP\fB\fP\fB, this section is no longer \fP\fI\fP\fImaintained\fP\fB\fP\fB, now that the private function prototypes are hidden in pngpriv.h and not accessible to applications. Look in pngpriv.h for the prototypes and a short description of each \fI\fIfunction.
.SH DESCRIPTION
The functions previously listed here are used privately by libpng and are not
diff --git a/Build/source/libs/libpng/libpng-src/png.5 b/Build/source/libs/libpng/libpng-src/png.5
index 08da75b5ef7..b0cbd2cfa63 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 "March 16, 2017"
+.TH PNG 5 "April 1, 2017"
.SH NAME
png \- Portable Network Graphics (PNG) format
.SH DESCRIPTION
@@ -23,11 +23,11 @@ platforms.
PNG specification (second edition), November 2003:
.IP
.br
- <http://www.w3.org/TR/2003/REC-PNG-20031110/
+ <https://www.w3.org/TR/2003/REC-PNG-20031110/
PNG 1.2 specification, July 1999:
.IP
.br
-http://png-mng.sourceforge.net/pub/png/spec/1.2/
+https://png-mng.sourceforge.io/pub/png/spec/1.2/
.LP
PNG 1.0 specification, October 1996:
.IP
@@ -35,11 +35,11 @@ PNG 1.0 specification, October 1996:
RFC 2083
.IP
.br
-http://www.ietf.org/rfc/rfc2083.txt
+https://www.ietf.org/rfc/rfc2083.txt
.br
or (as a W3C Recommendation) at
.br
-http://www.w3.org/TR/REC-png-961001
+https://www.w3.org/TR/REC-png-961001
.SH AUTHORS
This man page: Glenn Randers-Pehrson
.LP
diff --git a/Build/source/libs/libpng/libpng-src/png.c b/Build/source/libs/libpng/libpng-src/png.c
index 2c9fea2123a..40688be1231 100644
--- a/Build/source/libs/libpng/libpng-src/png.c
+++ b/Build/source/libs/libpng/libpng-src/png.c
@@ -1,7 +1,7 @@
/* png.c - location for general purpose libpng functions
*
- * Last changed in libpng 1.6.29 [March 16, 2017]
+ * Last changed in libpng 1.6.30 [(PENDING RELEASE)]
* Copyright (c) 1998-2002,2004,2006-2017 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_29 Your_png_h_is_not_version_1_6_29;
+typedef png_libpng_version_1_6_30 Your_png_h_is_not_version_1_6_30;
/* 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
@@ -776,14 +776,14 @@ png_get_copyright(png_const_structrp png_ptr)
#else
# ifdef __STDC__
return PNG_STRING_NEWLINE \
- "libpng version 1.6.29 - March 16, 2017" PNG_STRING_NEWLINE \
+ "libpng version 1.6.30 - June 28, 2017" PNG_STRING_NEWLINE \
"Copyright (c) 1998-2002,2004,2006-2017 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.29 - March 16, 2017\
+ return "libpng version 1.6.30 - June 28, 2017\
Copyright (c) 1998-2002,2004,2006-2017 Glenn Randers-Pehrson\
Copyright (c) 1996-1997 Andreas Dilger\
Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc.";
@@ -2832,7 +2832,7 @@ png_pow10(int power)
if (power < 0)
{
if (power < DBL_MIN_10_EXP) return 0;
- recip = 1, power = -power;
+ recip = 1; power = -power;
}
if (power > 0)
@@ -2910,7 +2910,9 @@ png_ascii_from_fp(png_const_structrp png_ptr, png_charp ascii, png_size_t size,
double test = png_pow10(exp_b10+1);
if (test <= DBL_MAX)
- ++exp_b10, base = test;
+ {
+ ++exp_b10; base = test;
+ }
else
break;
@@ -2924,7 +2926,10 @@ png_ascii_from_fp(png_const_structrp png_ptr, png_charp ascii, png_size_t size,
* test on DBL_MAX above.
*/
fp /= base;
- while (fp >= 1) fp /= 10, ++exp_b10;
+ while (fp >= 1)
+ {
+ fp /= 10; ++exp_b10;
+ }
/* Because of the code above fp may, at this point, be
* less than .1, this is ok because the code below can
@@ -2975,7 +2980,7 @@ png_ascii_from_fp(png_const_structrp png_ptr, png_charp ascii, png_size_t size,
/* Rounding up to 10, handle that here. */
if (czero > 0)
{
- --czero, d = 1;
+ --czero; d = 1;
if (cdigits == 0) --clead;
}
else
@@ -2989,7 +2994,7 @@ png_ascii_from_fp(png_const_structrp png_ptr, png_charp ascii, png_size_t size,
else if (ch == 46)
{
- ch = *--ascii, ++size;
+ ch = *--ascii; ++size;
/* Advance exp_b10 to '1', so that the
* decimal point happens after the
* previous digit.
@@ -3016,7 +3021,9 @@ png_ascii_from_fp(png_const_structrp png_ptr, png_charp ascii, png_size_t size,
int ch = *--ascii;
if (ch == 46)
- ++size, exp_b10 = 1;
+ {
+ ++size; exp_b10 = 1;
+ }
/* Else lost a leading zero, so 'exp_b10' is
* still ok at (-1)
@@ -3052,21 +3059,26 @@ png_ascii_from_fp(png_const_structrp png_ptr, png_charp ascii, png_size_t size,
*/
if (exp_b10 != (-1))
{
- if (exp_b10 == 0) *ascii++ = 46, --size;
+ if (exp_b10 == 0)
+ {
+ *ascii++ = 46; --size;
+ }
/* PLUS 1: TOTAL 4 */
--exp_b10;
}
- *ascii++ = 48, --czero;
+ *ascii++ = 48; --czero;
}
if (exp_b10 != (-1))
{
if (exp_b10 == 0)
- *ascii++ = 46, --size; /* counted above */
+ {
+ *ascii++ = 46; --size; /* counted above */
+ }
--exp_b10;
}
- *ascii++ = (char)(48 + (int)d), ++cdigits;
+ *ascii++ = (char)(48 + (int)d); ++cdigits;
}
}
while (cdigits+czero < precision+clead && fp > DBL_MIN);
@@ -3107,7 +3119,7 @@ png_ascii_from_fp(png_const_structrp png_ptr, png_charp ascii, png_size_t size,
*/
size -= cdigits;
- *ascii++ = 69, --size; /* 'E': PLUS 1 TOTAL 2+precision */
+ *ascii++ = 69; --size; /* 'E': PLUS 1 TOTAL 2+precision */
/* The following use of an unsigned temporary avoids ambiguities in
* the signed arithmetic on exp_b10 and permits GCC at least to do
@@ -3118,7 +3130,7 @@ png_ascii_from_fp(png_const_structrp png_ptr, png_charp ascii, png_size_t size,
if (exp_b10 < 0)
{
- *ascii++ = 45, --size; /* '-': PLUS 1 TOTAL 3+precision */
+ *ascii++ = 45; --size; /* '-': PLUS 1 TOTAL 3+precision */
uexp_b10 = (unsigned int)(-exp_b10);
}
@@ -3185,7 +3197,9 @@ png_ascii_from_fixed(png_const_structrp png_ptr, png_charp ascii,
/* Avoid overflow here on the minimum integer. */
if (fp < 0)
- *ascii++ = 45, num = (png_uint_32)(-fp);
+ {
+ *ascii++ = 45; num = (png_uint_32)(-fp);
+ }
else
num = (png_uint_32)fp;
@@ -3223,7 +3237,10 @@ png_ascii_from_fixed(png_const_structrp png_ptr, png_charp ascii,
* then ndigits digits to first:
*/
i = 5;
- while (ndigits < i) *ascii++ = 48, --i;
+ while (ndigits < i)
+ {
+ *ascii++ = 48; --i;
+ }
while (ndigits >= first) *ascii++ = digits[--ndigits];
/* Don't output the trailing zeros! */
}
@@ -4278,7 +4295,7 @@ png_set_option(png_structrp png_ptr, int option, int onoff)
defined(PNG_SIMPLIFIED_WRITE_SUPPORTED)
/* sRGB conversion tables; these are machine generated with the code in
* contrib/tools/makesRGB.c. The actual sRGB transfer curve defined in the
- * specification (see the article at http://en.wikipedia.org/wiki/SRGB)
+ * specification (see the article at https://en.wikipedia.org/wiki/SRGB)
* is used, not the gamma=1/2.2 approximation use elsewhere in libpng.
* The sRGB to linear table is exact (to the nearest 16-bit linear fraction).
* The inverse (linear to sRGB) table has accuracies as follows:
diff --git a/Build/source/libs/libpng/libpng-src/png.h b/Build/source/libs/libpng/libpng-src/png.h
index 2431e0dfc00..c2c4fdf2519 100644
--- a/Build/source/libs/libpng/libpng-src/png.h
+++ b/Build/source/libs/libpng/libpng-src/png.h
@@ -1,7 +1,7 @@
/* png.h - header file for PNG reference library
*
- * libpng version 1.6.29, March 16, 2017
+ * libpng version 1.6.30, June 28, 2017
*
* Copyright (c) 1998-2002,2004,2006-2017 Glenn Randers-Pehrson
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
@@ -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.29, March 16, 2017:
+ * libpng versions 0.97, January 1998, through 1.6.30, June 28, 2017:
* Glenn Randers-Pehrson.
* See also "Contributing Authors", below.
*/
@@ -25,7 +25,7 @@
*
* This code is released under the libpng license.
*
- * libpng versions 1.0.7, July 1, 2000 through 1.6.29, March 16, 2017 are
+ * libpng versions 1.0.7, July 1, 2000 through 1.6.30, June 28, 2017 are
* Copyright (c) 2000-2002, 2004, 2006-2017 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
@@ -213,7 +213,7 @@
* ...
* 1.5.28 15 10527 15.so.15.28[.0]
* ...
- * 1.6.29 16 10629 16.so.16.29[.0]
+ * 1.6.30 16 10630 16.so.16.30[.0]
*
* Henceforth the source version will match the shared-library major
* and minor numbers; the shared-library major version number will be
@@ -234,20 +234,20 @@
*
* See libpng.txt or libpng.3 for more information. The PNG specification
* is available as a W3C Recommendation and as an ISO Specification,
- * <http://www.w3.org/TR/2003/REC-PNG-20031110/
+ * <https://www.w3.org/TR/2003/REC-PNG-20031110/
*/
/*
* Y2K compliance in libpng:
* =========================
*
- * March 16, 2017
+ * June 28, 2017
*
* 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.29 are Y2K compliant. It is my belief that
+ * upward through 1.6.30 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
@@ -309,8 +309,8 @@
*/
/* Version information for png.h - this should match the version in png.c */
-#define PNG_LIBPNG_VER_STRING "1.6.29"
-#define PNG_HEADER_VERSION_STRING " libpng version 1.6.29 - March 16, 2017\n"
+#define PNG_LIBPNG_VER_STRING "1.6.30"
+#define PNG_HEADER_VERSION_STRING " libpng version 1.6.30 - June 28, 2017\n"
#define PNG_LIBPNG_VER_SONUM 16
#define PNG_LIBPNG_VER_DLLNUM 16
@@ -318,7 +318,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 29
+#define PNG_LIBPNG_VER_RELEASE 30
/* This should match the numeric part of the final component of
* PNG_LIBPNG_VER_STRING, omitting any leading zero:
@@ -349,7 +349,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 10629 /* 1.6.29 */
+#define PNG_LIBPNG_VER 10630 /* 1.6.30 */
/* Library configuration: these options cannot be changed after
* the library has been built.
@@ -459,7 +459,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_29;
+typedef char* png_libpng_version_1_6_30;
/* Basic control structions. Read libpng-manual.txt or libpng.3 for more info.
*
@@ -2753,7 +2753,7 @@ typedef struct
*
* When the simplified API needs to convert between sRGB and linear colorspaces,
* the actual sRGB transfer curve defined in the sRGB specification (see the
- * article at http://en.wikipedia.org/wiki/SRGB) is used, not the gamma=1/2.2
+ * article at https://en.wikipedia.org/wiki/SRGB) is used, not the gamma=1/2.2
* approximation used elsewhere in libpng.
*
* When an alpha channel is present it is expected to denote pixel coverage
diff --git a/Build/source/libs/libpng/libpng-src/pngconf.h b/Build/source/libs/libpng/libpng-src/pngconf.h
index 78d8b92b0ea..f64592acd7d 100644
--- a/Build/source/libs/libpng/libpng-src/pngconf.h
+++ b/Build/source/libs/libpng/libpng-src/pngconf.h
@@ -1,7 +1,7 @@
/* pngconf.h - machine configurable file for libpng
*
- * libpng version 1.6.29, March 16, 2017
+ * libpng version 1.6.30, June 28, 2017
*
* Copyright (c) 1998-2002,2004,2006-2016 Glenn Randers-Pehrson
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
diff --git a/Build/source/libs/libpng/libpng-src/pnglibconf.h b/Build/source/libs/libpng/libpng-src/pnglibconf.h
index 82f6ba46191..da3d8359f4c 100644
--- a/Build/source/libs/libpng/libpng-src/pnglibconf.h
+++ b/Build/source/libs/libpng/libpng-src/pnglibconf.h
@@ -1,10 +1,10 @@
-/* libpng 1.6.29 STANDARD API DEFINITION */
+/* libpng 1.6.30 STANDARD API DEFINITION */
/* pnglibconf.h - library build configuration */
-/* Libpng version 1.6.29 - March 16, 2017 */
+/* Libpng version 1.6.30 - June 28, 2017 */
-/* Copyright (c) 1998-2015 Glenn Randers-Pehrson */
+/* Copyright (c) 1998-2017 Glenn Randers-Pehrson */
/* 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/pngpriv.h b/Build/source/libs/libpng/libpng-src/pngpriv.h
index 6d2e424d2ee..a062a8da16d 100644
--- a/Build/source/libs/libpng/libpng-src/pngpriv.h
+++ b/Build/source/libs/libpng/libpng-src/pngpriv.h
@@ -1,7 +1,7 @@
/* pngpriv.h - private declarations for use inside libpng
*
- * Last changed in libpng 1.6.29 [March 16, 2017]
+ * Last changed in libpng 1.6.30 [(PENDING RELEASE)]
* Copyright (c) 1998-2002,2004,2006-2017 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.)
@@ -466,7 +466,16 @@
static_cast<type>(static_cast<const void*>(value))
#else
# define png_voidcast(type, value) (value)
-# define png_constcast(type, value) ((type)(value))
+# ifdef _WIN64
+# ifdef __GNUC__
+ typedef unsigned long long png_ptruint;
+# else
+ typedef unsigned __int64 png_ptruint;
+# endif
+# else
+ typedef unsigned long png_ptruint;
+# endif
+# define png_constcast(type, value) ((type)(png_ptruint)(const void*)(value))
# define png_aligncast(type, value) ((void*)(value))
# define png_aligncastconst(type, value) ((const void*)(value))
#endif /* __cplusplus */
diff --git a/Build/source/libs/libpng/libpng-src/pngrtran.c b/Build/source/libs/libpng/libpng-src/pngrtran.c
index 16c1ed60861..3886833af04 100644
--- a/Build/source/libs/libpng/libpng-src/pngrtran.c
+++ b/Build/source/libs/libpng/libpng-src/pngrtran.c
@@ -1,7 +1,7 @@
/* pngrtran.c - transforms the data in a row for PNG readers
*
- * Last changed in libpng 1.6.29 [March 16, 2017]
+ * Last changed in libpng 1.6.30 [(PENDING RELEASE)]
* Copyright (c) 1998-2002,2004,2006-2017 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.)
@@ -2934,7 +2934,7 @@ png_do_gray_to_rgb(png_row_infop row_info, png_bytep row)
* using the equation given in Poynton's ColorFAQ of 1998-01-04 at
* <http://www.inforamp.net/~poynton/> (THIS LINK IS DEAD June 2008 but
* versions dated 1998 through November 2002 have been archived at
- * http://web.archive.org/web/20000816232553/http://www.inforamp.net/
+ * https://web.archive.org/web/20000816232553/www.inforamp.net/
* ~poynton/notes/colour_and_gamma/ColorFAQ.txt )
* Charles Poynton poynton at poynton.com
*
@@ -4601,7 +4601,9 @@ png_do_expand_16(png_row_infop row_info, png_bytep row)
png_byte *sp = row + row_info->rowbytes; /* source, last byte + 1 */
png_byte *dp = sp + row_info->rowbytes; /* destination, end + 1 */
while (dp > sp)
- dp[-2] = dp[-1] = *--sp, dp -= 2;
+ {
+ dp[-2] = dp[-1] = *--sp; dp -= 2;
+ }
row_info->rowbytes *= 2;
row_info->bit_depth = 16;
diff --git a/Build/source/libs/libpng/libpng-src/pngrutil.c b/Build/source/libs/libpng/libpng-src/pngrutil.c
index 76f079a69fe..f60545bf903 100644
--- a/Build/source/libs/libpng/libpng-src/pngrutil.c
+++ b/Build/source/libs/libpng/libpng-src/pngrutil.c
@@ -1,7 +1,7 @@
/* pngrutil.c - utilities to read a PNG file
*
- * Last changed in libpng 1.6.29 [March 16, 2017]
+ * Last changed in libpng 1.6.30 [(PENDING RELEASE)]
* Copyright (c) 1998-2002,2004,2006-2017 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.)
@@ -2537,6 +2537,9 @@ png_handle_zTXt(png_structrp png_ptr, png_inforp info_ptr, png_uint_32 length)
if ((png_ptr->mode & PNG_HAVE_IDAT) != 0)
png_ptr->mode |= PNG_AFTER_IDAT;
+ /* Note, "length" is sufficient here; we won't be adding
+ * a null terminator later.
+ */
buffer = png_read_buffer(png_ptr, length, 2/*silent*/);
if (buffer == NULL)
@@ -3377,7 +3380,7 @@ png_combine_row(png_const_structrp png_ptr, png_bytep dp, int display)
*/
do
{
- dp[0] = sp[0], dp[1] = sp[1];
+ dp[0] = sp[0]; dp[1] = sp[1];
if (row_width <= bytes_to_jump)
return;
@@ -3398,7 +3401,7 @@ png_combine_row(png_const_structrp png_ptr, png_bytep dp, int display)
*/
for (;;)
{
- dp[0] = sp[0], dp[1] = sp[1], dp[2] = sp[2];
+ dp[0] = sp[0]; dp[1] = sp[1]; dp[2] = sp[2];
if (row_width <= bytes_to_jump)
return;
@@ -3887,7 +3890,10 @@ png_read_filter_row_paeth_1byte_pixel(png_row_infop row_info, png_bytep row,
/* Find the best predictor, the least of pa, pb, pc favoring the earlier
* ones in the case of a tie.
*/
- if (pb < pa) pa = pb, a = b;
+ if (pb < pa)
+ {
+ pa = pb; a = b;
+ }
if (pc < pa) a = c;
/* Calculate the current pixel in a, and move the previous row pixel to c
@@ -3939,7 +3945,10 @@ png_read_filter_row_paeth_multibyte_pixel(png_row_infop row_info, png_bytep row,
pc = (p + pc) < 0 ? -(p + pc) : p + pc;
#endif
- if (pb < pa) pa = pb, a = b;
+ if (pb < pa)
+ {
+ pa = pb; a = b;
+ }
if (pc < pa) a = c;
a += *row;
diff --git a/Build/source/libs/libpng/libpng-src/pngset.c b/Build/source/libs/libpng/libpng-src/pngset.c
index 28ff3a064d1..fb495ac3fb7 100644
--- a/Build/source/libs/libpng/libpng-src/pngset.c
+++ b/Build/source/libs/libpng/libpng-src/pngset.c
@@ -1,8 +1,8 @@
/* pngset.c - storage of image information into info struct
*
- * Last changed in libpng 1.6.26 [October 20, 2016]
- * Copyright (c) 1998-2016 Glenn Randers-Pehrson
+ * Last changed in libpng 1.6.30 [(PENDING RELEASE)]
+ * Copyright (c) 1998-2017 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.)
*
@@ -1102,8 +1102,9 @@ png_set_sPLT(png_const_structrp png_ptr,
info_ptr->valid |= PNG_INFO_sPLT;
++(info_ptr->splt_palettes_num);
++np;
+ ++entries;
}
- while (++entries, --nentries);
+ while (--nentries);
if (nentries > 0)
png_chunk_report(png_ptr, "sPLT out of memory", PNG_CHUNK_WRITE_ERROR);
@@ -1696,14 +1697,16 @@ png_check_keyword(png_structrp png_ptr, png_const_charp key, png_bytep new_key)
png_byte ch = (png_byte)*key++;
if ((ch > 32 && ch <= 126) || (ch >= 161 /*&& ch <= 255*/))
- *new_key++ = ch, ++key_len, space = 0;
+ {
+ *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;
+ *new_key++ = 32; ++key_len; space = 1;
/* If the character was not a space then it is invalid. */
if (ch != 32)
@@ -1716,7 +1719,7 @@ png_check_keyword(png_structrp png_ptr, png_const_charp key, png_bytep new_key)
if (key_len > 0 && space != 0) /* trailing space */
{
- --key_len, --new_key;
+ --key_len; --new_key;
if (bad_character == 0)
bad_character = 32;
}
diff --git a/Build/source/libs/libpng/libpng-src/pngtest.c b/Build/source/libs/libpng/libpng-src/pngtest.c
index 255fd14734a..d2938d18385 100644
--- a/Build/source/libs/libpng/libpng-src/pngtest.c
+++ b/Build/source/libs/libpng/libpng-src/pngtest.c
@@ -2088,4 +2088,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_29 Your_png_h_is_not_version_1_6_29;
+typedef png_libpng_version_1_6_30 Your_png_h_is_not_version_1_6_30;
diff --git a/Build/source/libs/libpng/libpng-src/pngtrans.c b/Build/source/libs/libpng/libpng-src/pngtrans.c
index da7413fb809..6c8c646239f 100644
--- a/Build/source/libs/libpng/libpng-src/pngtrans.c
+++ b/Build/source/libs/libpng/libpng-src/pngtrans.c
@@ -1,8 +1,8 @@
/* pngtrans.c - transforms the data in a row (used by both readers and writers)
*
- * Last changed in libpng 1.6.26 [October 20, 2016]
- * Copyright (c) 1998-2002,2004,2006-2016 Glenn Randers-Pehrson
+ * Last changed in libpng 1.6.30 [(PENDING RELEASE)]
+ * Copyright (c) 1998-2002,2004,2006-2017 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.)
*
@@ -514,11 +514,15 @@ png_do_strip_channel(png_row_infop row_info, png_bytep row, int at_start)
if (at_start != 0) /* Skip initial filler */
++sp;
else /* Skip initial channel and, for sp, the filler */
- sp += 2, ++dp;
+ {
+ sp += 2; ++dp;
+ }
/* For a 1 pixel wide image there is nothing to do */
while (sp < ep)
- *dp++ = *sp, sp += 2;
+ {
+ *dp++ = *sp; sp += 2;
+ }
row_info->pixel_depth = 8;
}
@@ -528,10 +532,14 @@ png_do_strip_channel(png_row_infop row_info, png_bytep row, int at_start)
if (at_start != 0) /* Skip initial filler */
sp += 2;
else /* Skip initial channel and, for sp, the filler */
- sp += 4, dp += 2;
+ {
+ sp += 4; dp += 2;
+ }
while (sp < ep)
- *dp++ = *sp++, *dp++ = *sp, sp += 3;
+ {
+ *dp++ = *sp++; *dp++ = *sp; sp += 3;
+ }
row_info->pixel_depth = 16;
}
@@ -554,11 +562,15 @@ png_do_strip_channel(png_row_infop row_info, png_bytep row, int at_start)
if (at_start != 0) /* Skip initial filler */
++sp;
else /* Skip initial channels and, for sp, the filler */
- sp += 4, dp += 3;
+ {
+ sp += 4; dp += 3;
+ }
/* Note that the loop adds 3 to dp and 4 to sp each time. */
while (sp < ep)
- *dp++ = *sp++, *dp++ = *sp++, *dp++ = *sp, sp += 2;
+ {
+ *dp++ = *sp++; *dp++ = *sp++; *dp++ = *sp; sp += 2;
+ }
row_info->pixel_depth = 24;
}
@@ -568,14 +580,16 @@ png_do_strip_channel(png_row_infop row_info, png_bytep row, int at_start)
if (at_start != 0) /* Skip initial filler */
sp += 2;
else /* Skip initial channels and, for sp, the filler */
- sp += 8, dp += 6;
+ {
+ sp += 8; dp += 6;
+ }
while (sp < ep)
{
/* Copy 6 bytes, skip 2 */
- *dp++ = *sp++, *dp++ = *sp++;
- *dp++ = *sp++, *dp++ = *sp++;
- *dp++ = *sp++, *dp++ = *sp, sp += 3;
+ *dp++ = *sp++; *dp++ = *sp++;
+ *dp++ = *sp++; *dp++ = *sp++;
+ *dp++ = *sp++; *dp++ = *sp; sp += 3;
}
row_info->pixel_depth = 48;
diff --git a/Build/source/libs/libpng/libpng-src/pngwutil.c b/Build/source/libs/libpng/libpng-src/pngwutil.c
index 0f98d582daf..dd800586be6 100644
--- a/Build/source/libs/libpng/libpng-src/pngwutil.c
+++ b/Build/source/libs/libpng/libpng-src/pngwutil.c
@@ -1003,7 +1003,8 @@ png_compress_IDAT(png_structrp png_ptr, png_const_bytep input,
optimize_cmf(data, png_image_size(png_ptr));
#endif
- png_write_complete_chunk(png_ptr, png_IDAT, data, size);
+ if (size > 0)
+ png_write_complete_chunk(png_ptr, png_IDAT, data, size);
png_ptr->mode |= PNG_HAVE_IDAT;
png_ptr->zstream.next_out = data;
@@ -1049,7 +1050,8 @@ png_compress_IDAT(png_structrp png_ptr, png_const_bytep input,
optimize_cmf(data, png_image_size(png_ptr));
#endif
- png_write_complete_chunk(png_ptr, png_IDAT, data, size);
+ if (size > 0)
+ png_write_complete_chunk(png_ptr, png_IDAT, data, size);
png_ptr->zstream.avail_out = 0;
png_ptr->zstream.next_out = NULL;
png_ptr->mode |= PNG_HAVE_IDAT | PNG_AFTER_IDAT;
diff --git a/Build/source/libs/libpng/libpng-src/projects/owatcom/pngconfig.mak b/Build/source/libs/libpng/libpng-src/projects/owatcom/pngconfig.mak
index 054a3fc2071..3ef2948ca29 100644
--- a/Build/source/libs/libpng/libpng-src/projects/owatcom/pngconfig.mak
+++ b/Build/source/libs/libpng/libpng-src/projects/owatcom/pngconfig.mak
@@ -126,7 +126,7 @@ $# to work, download Brian Kernighan's awk (Brian Kernighan is the author of
$# awk.) You can find source code and a built executable (called awk95.exe)
$# here:
$#
-$# http://www.cs.princeton.edu/~bwk/btl.mirror/
+$# https://www.cs.princeton.edu/~bwk/btl.mirror/
$#
$# The executable works just fine.
$#
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 1000d118ea3..1856022e26d 100644
--- a/Build/source/libs/libpng/libpng-src/projects/vstudio/README.txt
+++ b/Build/source/libs/libpng/libpng-src/projects/vstudio/README.txt
@@ -1,7 +1,7 @@
VisualStudio instructions
-libpng version 1.6.29 - March 16, 2017
+libpng version 1.6.30 - June 28, 2017
Copyright (c) 2010,2013,2015 Glenn Randers-Pehrson
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 18da337e4bc..df9c4d60783 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.29 - March 16, 2017
+ * libpng version 1.6.30 - June 28, 2017
*
* 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 9b3c0907f16..24b1228360e 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.29 - March 16, 2017
+Makefiles for libpng version 1.6.30 - June 28, 2017
pnglibconf.h.prebuilt => Stores configuration settings
makefile.linux => Linux/ELF makefile
- (gcc, creates libpng16.so.16.1.6.29)
+ (gcc, creates libpng16.so.16.1.6.30)
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.29)
+ creates libpng16.so.16.1.6.30)
makefile.sgi => Silicon Graphics IRIX makefile (cc, creates static lib)
makefile.solaris => Solaris 2.X makefile (gcc,
- creates libpng16.so.16.1.6.29)
+ creates libpng16.so.16.1.6.30)
makefile.so9 => Solaris 9 makefile (gcc,
- creates libpng16.so.16.1.6.29)
+ creates libpng16.so.16.1.6.30)
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 6a1831bb50c..f474f1f3f8c 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.29"
+PNG_DFN ";Version 1.6.30"
#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 e06ed8e1256..4efbab7e7b0 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.29
+version=1.6.30
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 e8bf22dbc02..08365a4e7b8 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.29
+Version: 1.6.30
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 ca8ef6aedbc..6043845bb22 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 = 29
+VERMIC = 30
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 c6450bb55bc..f3f9550b80d 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 = 29
+RELEASE = 30
# Shared library names:
LIBSO=$(LIBNAME).so
@@ -92,7 +92,7 @@ OBJSDLL = $(OBJS:.o=.pic.o)
$(CC) -c $(CPPFLAGS) $(CFLAGS) -o $@ $<
.c.pic.o:
- $(CC) -c $(CFLAGS) -fPIC -o $@ $*.c
+ $(CC) -c $(CPPFLAGS) $(CFLAGS) -fPIC -o $@ $*.c
all: libpng.a $(LIBSO) pngtest pngtest-static libpng.pc libpng-config
diff --git a/Build/source/libs/libpng/libpng-src/scripts/makefile.msys b/Build/source/libs/libpng/libpng-src/scripts/makefile.msys
index 4df88f91582..c603673da04 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 = 29
+RELEASE = 30
# 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 fd4e485505e..54f7a6ed4b6 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.29
+SHLIB_MINOR= 1.6.30
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 210c8b606ab..e296b08beba 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.29
+SHLIB_MINOR= 1.6.30
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 4f3d5823a32..e8819333b8b 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.29
+SHLIB_MINOR= 1.6.30
LIB= png
SRCS= png.c pngerror.c pngget.c pngmem.c pngpread.c \
diff --git a/Build/source/libs/libpng/libpng-src/scripts/makefile.solaris-x86 b/Build/source/libs/libpng/libpng-src/scripts/makefile.solaris-x86
index b6d24375d4d..2ee3c14a53d 100644
--- a/Build/source/libs/libpng/libpng-src/scripts/makefile.solaris-x86
+++ b/Build/source/libs/libpng/libpng-src/scripts/makefile.solaris-x86
@@ -83,7 +83,7 @@ OBJSDLL = $(OBJS:.o=.pic.o)
$(CC) -c $(CPPFLAGS) $(CFLAGS) -o $@ $<
.c.pic.o:
- $(CC) -c $(CFLAGS) -fPIC -o $@ $*.c
+ $(CC) -c $(CPPFLAGS) $(CFLAGS) -fPIC -o $@ $*.c
all: libpng.a $(LIBSO) pngtest libpng.pc libpng-config
diff --git a/Build/source/libs/libpng/libpng-src/scripts/pnglibconf.dfa b/Build/source/libs/libpng/libpng-src/scripts/pnglibconf.dfa
index 9df2a4311d7..4d4e13b166f 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-2016 Glenn Randers-Pehrson
+com Copyright (c) 1998-2017 Glenn Randers-Pehrson
com
com This code is released under the libpng license.
com For conditions of distribution and use, see the disclaimer
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 82f6ba46191..da3d8359f4c 100644
--- a/Build/source/libs/libpng/libpng-src/scripts/pnglibconf.h.prebuilt
+++ b/Build/source/libs/libpng/libpng-src/scripts/pnglibconf.h.prebuilt
@@ -1,10 +1,10 @@
-/* libpng 1.6.29 STANDARD API DEFINITION */
+/* libpng 1.6.30 STANDARD API DEFINITION */
/* pnglibconf.h - library build configuration */
-/* Libpng version 1.6.29 - March 16, 2017 */
+/* Libpng version 1.6.30 - June 28, 2017 */
-/* Copyright (c) 1998-2015 Glenn Randers-Pehrson */
+/* Copyright (c) 1998-2017 Glenn Randers-Pehrson */
/* 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/scripts/symbols.def b/Build/source/libs/libpng/libpng-src/scripts/symbols.def
index 6c8eebff1b4..fe90a29a343 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.29
+;Version 1.6.30
;--------------------------------------------------------------
; 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/version.ac b/Build/source/libs/libpng/version.ac
index ce86449901a..5ec18f957ee 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.29])
+m4_define([libpng_version], [1.6.30])