[master] Imported from libpng-1.6.16.tar

This commit is contained in:
Glenn Randers-Pehrson 2014-12-21 22:08:09 -05:00
parent da7a1e79af
commit 070a616b82
42 changed files with 246 additions and 192 deletions

View File

@ -1,4 +1,4 @@
Libpng 1.6.15 - November 20, 2014 Libpng 1.6.16 - December 22, 2014
This is a public release of libpng, intended for use in production codes. This is a public release of libpng, intended for use in production codes.
@ -7,55 +7,30 @@ Files available for download:
Source files with LF line endings (for Unix/Linux) and with a Source files with LF line endings (for Unix/Linux) and with a
"configure" script "configure" script
libpng-1.6.15.tar.xz (LZMA-compressed, recommended) libpng-1.6.16.tar.xz (LZMA-compressed, recommended)
libpng-1.6.15.tar.gz libpng-1.6.16.tar.gz
Source files with CRLF line endings (for Windows), without the Source files with CRLF line endings (for Windows), without the
"configure" script "configure" script
lpng1615.7z (LZMA-compressed, recommended) lpng1616.7z (LZMA-compressed, recommended)
lpng1615.zip lpng1616.zip
Other information: Other information:
libpng-1.6.15-README.txt libpng-1.6.16-README.txt
libpng-1.6.15-LICENSE.txt libpng-1.6.16-LICENSE.txt
libpng-1.6.15-*.asc (armored detached GPG signatures) libpng-1.6.16-*.asc (armored detached GPG signatures)
Changes since the last public release (1.6.14): Changes since the last public release (1.6.15):
Changed "if (!x)" to "if (x == 0)" and "if (x)" to "if (x != 0)" Added ".align 2" to arm/filter_neon.S to support old GAS assemblers that
Simplified png_free_data(). don't do alignment correctly.
Added missing "ptr = NULL" after some instances of png_free(). Revised Makefile.am and scripts/*.dfn to work with MinGW/MSYS;
Made a one-line revision to configure.ac to support ARM on aarch64 renamed scripts/*.dfn to scripts/*.c (Bob Friesenhahn and John Bowler).
(bug report by Marcin Juszkiewicz, fix by John Bowler). Quiet a "comparison always true" warning in pngstest.c (John Bowler).
Avoid out-of-bounds memory access in png_user_version_check(). Restored a test on width that was removed from png.c at libpng-1.6.9
Simplified and future-proofed png_user_version_check(). (Bug report by Alex Eubanks).
Fixed GCC unsigned int->float warnings. Various versions of GCC Fixed an overflow in png_combine_row with very wide interlaced images.
seem to generate warnings when an unsigned value is implicitly
converted to double. This is probably a GCC bug but this change
avoids the issue by explicitly converting to (int) where safe.
Free all allocated memory in pngimage. The file buffer cache was left
allocated at the end of the program, harmless but it causes memory
leak reports from clang.
Fixed array size calculations to avoid warnings. At various points
in the code the number of elements in an array is calculated using
sizeof. This generates a compile time constant of type (size_t) which
is then typically assigned to an (unsigned int) or (int). Some versions
of GCC on 64-bit systems warn about the apparent narrowing, even though
the same compiler does apparently generate the correct, in-range,
numeric constant. This adds appropriate, safe, casts to make the
warnings go away.
Removed #ifdef PNG_16BIT_SUPPORTED/#endif around png_product2(); it is
needed by png_reciprocal2().
Added #ifdef PNG_16BIT_SUPPORTED/#endif around png_log16bit() and
png_do_swap().
Changed all "#endif /* PNG_FEATURE_SUPPORTED */" to "#endif /* FEATURE */"
The macros passed in the command line to Borland make were ignored if
similarly-named macros were already defined in makefiles. This behavior
is different from POSIX make and other make programs. Surround the
macro definitions with ifndef guards (Cosmin).
Added "-D_CRT_SECURE_NO_WARNINGS" to CFLAGS in scripts/makefile.vcwin32.
Removed the obsolete $ARCH variable from scripts/makefile.darwin.
Send comments/corrections/commendations to png-mng-implement at lists.sf.net Send comments/corrections/commendations to png-mng-implement at lists.sf.net
(subscription required; visit (subscription required; visit

27
CHANGES
View File

@ -5097,6 +5097,33 @@ Version 1.6.15rc03 [November 16, 2014]
Removed the obsolete $ARCH variable from scripts/makefile.darwin. Removed the obsolete $ARCH variable from scripts/makefile.darwin.
Version 1.6.15 [November 20, 2014] Version 1.6.15 [November 20, 2014]
No changes.
Version 1.6.16beta01 [December 14, 2014]
Added ".align 2" to arm/filter_neon.S to support old GAS assemblers that
don't do alignment correctly.
Revised Makefile.am and scripts/symbols.dfn to work with MinGW/MSYS
(Bob Friesenhahn).
Version 1.6.16beta02 [December 15, 2014]
Revised Makefile.am and scripts/*.dfn again to work with MinGW/MSYS;
renamed scripts/*.dfn to scripts/*.c (John Bowler).
Version 1.6.16beta03 [December 21, 2014]
Quiet a "comparison always true" warning in pngstest.c (John Bowler).
Version 1.6.16rc01 [December 21, 2014]
Restored a test on width that was removed from png.c at libpng-1.6.9
(Bug report by Alex Eubanks).
Version 1.6.16rc02 [December 21, 2014]
Undid the update to pngrutil.c in 1.6.16rc01.
Version 1.6.16rc03 [December 21, 2014]
Fixed an overflow in png_combine_row with very wide interlaced images.
Version 1.6.16 [December 22, 2014]
No changes.
Send comments/corrections/commendations to png-mng-implement at lists.sf.net Send comments/corrections/commendations to png-mng-implement at lists.sf.net
(subscription required; visit (subscription required; visit

View File

@ -16,7 +16,7 @@ enable_testing()
set(PNGLIB_MAJOR 1) set(PNGLIB_MAJOR 1)
set(PNGLIB_MINOR 6) set(PNGLIB_MINOR 6)
set(PNGLIB_RELEASE 15) set(PNGLIB_RELEASE 16)
set(PNGLIB_NAME libpng${PNGLIB_MAJOR}${PNGLIB_MINOR}) set(PNGLIB_NAME libpng${PNGLIB_MAJOR}${PNGLIB_MINOR})
set(PNGLIB_VERSION ${PNGLIB_MAJOR}.${PNGLIB_MINOR}.${PNGLIB_RELEASE}) set(PNGLIB_VERSION ${PNGLIB_MAJOR}.${PNGLIB_MINOR}.${PNGLIB_RELEASE})
@ -253,7 +253,7 @@ endif(NOT WIN32 OR CYGWIN OR MINGW)
# SET UP LINKS # SET UP LINKS
if(PNG_SHARED) if(PNG_SHARED)
set_target_properties(${PNG_LIB_NAME} PROPERTIES set_target_properties(${PNG_LIB_NAME} PROPERTIES
# VERSION 16.${PNGLIB_RELEASE}.1.6.15 # VERSION 16.${PNGLIB_RELEASE}.1.6.16
VERSION 16.${PNGLIB_RELEASE}.0 VERSION 16.${PNGLIB_RELEASE}.0
SOVERSION 16 SOVERSION 16
CLEAN_DIRECT_OUTPUT 1) CLEAN_DIRECT_OUTPUT 1)

View File

@ -10,7 +10,7 @@ this sentence.
This code is released under the libpng license. This code is released under the libpng license.
libpng versions 1.2.6, August 15, 2004, through 1.6.15, November 20, 2014, are libpng versions 1.2.6, August 15, 2004, through 1.6.16, December 22, 2014, are
Copyright (c) 2004, 2006-2014 Glenn Randers-Pehrson, and are Copyright (c) 2004, 2006-2014 Glenn Randers-Pehrson, and are
distributed according to the same disclaimer and license as libpng-1.2.5 distributed according to the same disclaimer and license as libpng-1.2.5
with the following individual added to the list of Contributing Authors with the following individual added to the list of Contributing Authors
@ -108,4 +108,4 @@ certification mark of the Open Source Initiative.
Glenn Randers-Pehrson Glenn Randers-Pehrson
glennrp at users.sourceforge.net glennrp at users.sourceforge.net
November 20, 2014 December 22, 2014

View File

@ -129,7 +129,7 @@ EXTRA_DIST= \
$(TESTS) $(XFAIL_TESTS) tests/pngstest \ $(TESTS) $(XFAIL_TESTS) tests/pngstest \
CMakeLists.txt example.c libpng-manual.txt CMakeLists.txt example.c libpng-manual.txt
SCRIPT_CLEANFILES=scripts/*.out scripts/*.chk scripts/pnglibconf.dfn SCRIPT_CLEANFILES=scripts/*.out scripts/*.chk scripts/pnglibconf.c
CLEANFILES= *.tf? pngout.png libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@.pc \ CLEANFILES= *.tf? pngout.png libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@.pc \
libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@-config libpng.vers libpng.sym \ libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@-config libpng.vers libpng.sym \
@ -152,7 +152,7 @@ AM_CFLAGS = ${PNG_COPTS}
# checks for this and sets DFNCPP appropriately. # checks for this and sets DFNCPP appropriately.
DFNCPP = @DFNCPP@ DFNCPP = @DFNCPP@
SUFFIXES = .chk .dfn .out SUFFIXES = .chk .out
$(PNGLIB_BASENAME).pc: libpng.pc $(PNGLIB_BASENAME).pc: libpng.pc
cp libpng.pc $@ cp libpng.pc $@
@ -237,18 +237,17 @@ if DO_PNG_PREFIX
SYMBOL_CFLAGS += -DPNG_PREFIX='@PNG_PREFIX@' SYMBOL_CFLAGS += -DPNG_PREFIX='@PNG_PREFIX@'
endif endif
.dfn.out: .c.out:
rm -f $@ $*.c $*.tf[12] rm -f $@ $*.tf[12]
test -d scripts || mkdir scripts || test -d scripts test -d scripts || mkdir scripts || test -d scripts
echo '#include "$<"' >$*.c
$(DFNCPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES)\ $(DFNCPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES)\
$(CPPFLAGS) $(SYMBOL_CFLAGS) $*.c > $*.tf1 $(CPPFLAGS) $(SYMBOL_CFLAGS) $< > $*.tf1
$(AWK) -f "${srcdir}/scripts/dfn.awk" out="$*.tf2" $*.tf1 1>&2 $(AWK) -f "${srcdir}/scripts/dfn.awk" out="$*.tf2" $*.tf1 1>&2
rm -f $*.c $*.tf1 rm -f $*.tf1
mv $*.tf2 $@ mv $*.tf2 $@
# The .dfn file for pnglibconf.h is machine generated # The .c file for pnglibconf.h is machine generated
pnglibconf.dfn: scripts/pnglibconf.dfa scripts/options.awk pngconf.h pngusr.dfa $(DFA_XTRA) pnglibconf.c: scripts/pnglibconf.dfa scripts/options.awk pngconf.h pngusr.dfa $(DFA_XTRA)
rm -f $@ $*.tf[45] rm -f $@ $*.tf[45]
$(AWK) -f ${srcdir}/scripts/options.awk out=$*.tf4 version=search\ $(AWK) -f ${srcdir}/scripts/options.awk out=$*.tf4 version=search\
${srcdir}/pngconf.h ${srcdir}/scripts/pnglibconf.dfa\ ${srcdir}/pngconf.h ${srcdir}/scripts/pnglibconf.dfa\
@ -268,7 +267,7 @@ scripts/symbols.chk: scripts/checksym.awk scripts/symbols.def scripts/symbols.ou
# used on demand to regenerate the standard header, CPPFLAGS should # used on demand to regenerate the standard header, CPPFLAGS should
# be empty - no non-standard defines # be empty - no non-standard defines
scripts/pnglibconf.dfn: scripts/pnglibconf.dfa scripts/options.awk pngconf.h scripts/pnglibconf.c: scripts/pnglibconf.dfa scripts/options.awk pngconf.h
rm -f $@ pnglibconf.tf[67] rm -f $@ pnglibconf.tf[67]
test -z "$(CPPFLAGS)" test -z "$(CPPFLAGS)"
echo "com @PNGLIB_VERSION@ STANDARD API DEFINITION" |\ echo "com @PNGLIB_VERSION@ STANDARD API DEFINITION" |\

2
README
View File

@ -1,4 +1,4 @@
README for libpng version 1.6.15 - November 20, 2014 (shared library 16.0) README for libpng version 1.6.16 - December 22, 2014 (shared library 16.0)
See the note about version numbers near the top of png.h See the note about version numbers near the top of png.h
See INSTALL for instructions on how to install libpng. See INSTALL for instructions on how to install libpng.

View File

@ -3,7 +3,7 @@
* *
* Copyright (c) 2014 Glenn Randers-Pehrson * Copyright (c) 2014 Glenn Randers-Pehrson
* Written by Mans Rullgard, 2011. * Written by Mans Rullgard, 2011.
* Last changed in libpng 1.6.10 [March 6, 2014] * Last changed in libpng 1.6.16 [December 22, 2014]
* *
* This code is released under the libpng license. * This code is released under the libpng license.
* For conditions of distribution and use, see the disclaimer * For conditions of distribution and use, see the disclaimer
@ -17,6 +17,7 @@
#include "../pngpriv.h" #include "../pngpriv.h"
#ifdef PNG_READ_SUPPORTED #ifdef PNG_READ_SUPPORTED
#if PNG_ARM_NEON_OPT > 0 #if PNG_ARM_NEON_OPT > 0
#ifdef PNG_ARM_NEON_CHECK_SUPPORTED /* Do run-time checks */ #ifdef PNG_ARM_NEON_CHECK_SUPPORTED /* Do run-time checks */
/* WARNING: it is strongly recommended that you do not build libpng with /* WARNING: it is strongly recommended that you do not build libpng with
@ -130,4 +131,4 @@ png_init_filter_functions_neon(png_structp pp, unsigned int bpp)
} }
} }
#endif /* PNG_ARM_NEON_OPT > 0 */ #endif /* PNG_ARM_NEON_OPT > 0 */
#endif /* PNG_READ_SUPPORTED */ #endif /* READ */

View File

@ -1,18 +1,17 @@
/* filter_neon.S - NEON optimised filter functions /* filter_neon.S - NEON optimised filter functions
* *
* Copyright (c) 2013 Glenn Randers-Pehrson * Copyright (c) 2014 Glenn Randers-Pehrson
* Written by Mans Rullgard, 2011. * Written by Mans Rullgard, 2011.
* Last changed in libpng 1.6.8 [December 19, 2013] * Last changed in libpng 1.6.16 [December 22, 2014]
* *
* This code is released under the libpng license. * This code is released under the libpng license.
* For conditions of distribution and use, see the disclaimer * For conditions of distribution and use, see the disclaimer
* and license in png.h * and license in png.h
*/ */
/* This is required to get the symbol renames, which are #defines, and also /* This is required to get the symbol renames, which are #defines, and the
* includes the definition (or not) of PNG_ARM_NEON_OPT and * definitions (or not) of PNG_ARM_NEON_OPT and PNG_ARM_NEON_IMPLEMENTATION.
* PNG_ARM_NEON_IMPLEMENTATION.
*/ */
#define PNG_VERSION_INFO_ONLY #define PNG_VERSION_INFO_ONLY
#include "../pngpriv.h" #include "../pngpriv.h"
@ -21,6 +20,8 @@
.section .note.GNU-stack,"",%progbits /* mark stack as non-executable */ .section .note.GNU-stack,"",%progbits /* mark stack as non-executable */
#endif #endif
#ifdef PNG_READ_SUPPORTED
/* Assembler NEON support - only works for 32-bit ARM (i.e. it does not work for /* Assembler NEON support - only works for 32-bit ARM (i.e. it does not work for
* ARM64). The code in arm/filter_neon_intrinsics.c supports ARM64, however it * ARM64). The code in arm/filter_neon_intrinsics.c supports ARM64, however it
* only works if -mfpu=neon is specified on the GCC command line. See pngpriv.h * only works if -mfpu=neon is specified on the GCC command line. See pngpriv.h
@ -28,7 +29,6 @@
*/ */
#if PNG_ARM_NEON_IMPLEMENTATION == 2 /* hand-coded assembler */ #if PNG_ARM_NEON_IMPLEMENTATION == 2 /* hand-coded assembler */
#ifdef PNG_READ_SUPPORTED
#if PNG_ARM_NEON_OPT > 0 #if PNG_ARM_NEON_OPT > 0
#ifdef __ELF__ #ifdef __ELF__
@ -47,6 +47,13 @@ ELF .size \name, . - \name
.purgem endfunc .purgem endfunc
.endm .endm
.text .text
/* Explicitly specifying alignment here because some versions of
* GAS don't align code correctly. This is harmless in correctly
* written versions of GAS.
*/
.align 2
.if \export .if \export
.global \name .global \name
.endif .endif
@ -242,5 +249,5 @@ func png_read_filter_row_paeth3_neon, export=1
pop {r4,pc} pop {r4,pc}
endfunc endfunc
#endif /* PNG_ARM_NEON_OPT > 0 */ #endif /* PNG_ARM_NEON_OPT > 0 */
#endif /* PNG_READ_SUPPORTED */
#endif /* PNG_ARM_NEON_IMPLEMENTATION == 2 (assembler) */ #endif /* PNG_ARM_NEON_IMPLEMENTATION == 2 (assembler) */
#endif /* READ */

View File

@ -1,11 +1,11 @@
/* filter_neon_intrinsics.c - NEON optimised filter functions /* filter_neon_intrinsics.c - NEON optimised filter functions
* *
* Copyright (c) 2013 Glenn Randers-Pehrson * Copyright (c) 2014 Glenn Randers-Pehrson
* Written by James Yu <james.yu at linaro.org>, October 2013. * Written by James Yu <james.yu at linaro.org>, October 2013.
* Based on filter_neon.S, written by Mans Rullgard, 2011. * Based on filter_neon.S, written by Mans Rullgard, 2011.
* *
* Last changed in libpng 1.6.8 [December 19, 2013] * Last changed in libpng 1.6.16 [December 22, 2014]
* *
* This code is released under the libpng license. * This code is released under the libpng license.
* For conditions of distribution and use, see the disclaimer * For conditions of distribution and use, see the disclaimer
@ -14,6 +14,8 @@
#include "../pngpriv.h" #include "../pngpriv.h"
#ifdef PNG_READ_SUPPORTED
/* This code requires -mfpu=neon on the command line: */ /* This code requires -mfpu=neon on the command line: */
#if PNG_ARM_NEON_IMPLEMENTATION == 1 /* intrinsics code from pngpriv.h */ #if PNG_ARM_NEON_IMPLEMENTATION == 1 /* intrinsics code from pngpriv.h */
@ -35,7 +37,6 @@
#define png_ldr(type,pointer)\ #define png_ldr(type,pointer)\
(temp_pointer = png_ptr(type,pointer), *temp_pointer) (temp_pointer = png_ptr(type,pointer), *temp_pointer)
#ifdef PNG_READ_SUPPORTED
#if PNG_ARM_NEON_OPT > 0 #if PNG_ARM_NEON_OPT > 0
void void
@ -368,5 +369,5 @@ png_read_filter_row_paeth4_neon(png_row_infop row_info, png_bytep row,
} }
#endif /* PNG_ARM_NEON_OPT > 0 */ #endif /* PNG_ARM_NEON_OPT > 0 */
#endif /* PNG_READ_SUPPORTED */
#endif /* PNG_ARM_NEON_IMPLEMENTATION == 1 (intrinsics) */ #endif /* PNG_ARM_NEON_IMPLEMENTATION == 1 (intrinsics) */
#endif /* READ */

View File

@ -18,7 +18,7 @@ AC_PREREQ([2.68])
dnl Version number stuff here: dnl Version number stuff here:
AC_INIT([libpng],[1.6.15],[png-mng-implement@lists.sourceforge.net]) AC_INIT([libpng],[1.6.16],[png-mng-implement@lists.sourceforge.net])
AC_CONFIG_MACRO_DIR([scripts]) AC_CONFIG_MACRO_DIR([scripts])
# libpng does not follow GNU file name conventions (hence 'foreign') # libpng does not follow GNU file name conventions (hence 'foreign')
@ -39,10 +39,10 @@ dnl automake, so the following is not necessary (and is not defined anyway):
dnl AM_PREREQ([1.11.2]) dnl AM_PREREQ([1.11.2])
dnl stop configure from automagically running automake dnl stop configure from automagically running automake
PNGLIB_VERSION=1.6.15 PNGLIB_VERSION=1.6.16
PNGLIB_MAJOR=1 PNGLIB_MAJOR=1
PNGLIB_MINOR=6 PNGLIB_MINOR=6
PNGLIB_RELEASE=15 PNGLIB_RELEASE=16
dnl End of version number stuff dnl End of version number stuff

View File

@ -2,7 +2,7 @@
* *
* Copyright (c) 2014 Glenn Randers-Pehrson * Copyright (c) 2014 Glenn Randers-Pehrson
* Written by John Bowler, 2014. * Written by John Bowler, 2014.
* Last changed in libpng 1.6.15 [November 20, 2014] * Last changed in libpng 1.6.16 [December 22, 2014]
* *
* This code is released under the libpng license. * This code is released under the libpng license.
* For conditions of distribution and use, see the disclaimer * For conditions of distribution and use, see the disclaimer
@ -16,8 +16,8 @@
* png_have_neon implemented for Linux by reading the widely available * png_have_neon implemented for Linux by reading the widely available
* pseudo-file /proc/cpuinfo. * pseudo-file /proc/cpuinfo.
* *
* This code is strict ANSI-C and is probably moderately portable, it does * This code is strict ANSI-C and is probably moderately portable; it does
* however use <stdio.h> and assumes that /proc/cpuinfo is never localized. * however use <stdio.h> and it assumes that /proc/cpuinfo is never localized.
*/ */
#include <stdio.h> #include <stdio.h>

View File

@ -1,9 +1,9 @@
/*- /*-
* pngstest.c * pngstest.c
* *
* Copyright (c) 2013 John Cunningham Bowler * Copyright (c) 2013-2014 John Cunningham Bowler
* *
* Last changed in libpng 1.6.8 [December 19, 2013] * Last changed in libpng 1.6.16 [December 22, 2014]
* *
* This code is released under the libpng license. * This code is released under the libpng license.
* For conditions of distribution and use, see the disclaimer * For conditions of distribution and use, see the disclaimer
@ -3173,32 +3173,43 @@ read_one_file(Image *image)
{ {
long int cb = ftell(f); long int cb = ftell(f);
if (cb > 0 && (unsigned long int)cb < (size_t)~(size_t)0) if (cb > 0)
{ {
png_bytep b = voidcast(png_bytep, malloc((size_t)cb)); if ((unsigned long int)cb <= (size_t)~(size_t)0)
if (b != NULL)
{ {
rewind(f); png_bytep b = voidcast(png_bytep, malloc((size_t)cb));
if (fread(b, (size_t)cb, 1, f) == 1) if (b != NULL)
{ {
fclose(f); rewind(f);
image->input_memory_size = cb;
image->input_memory = b; if (fread(b, (size_t)cb, 1, f) == 1)
{
fclose(f);
image->input_memory_size = cb;
image->input_memory = b;
}
else
{
free(b);
return logclose(image, f, image->file_name,
": read failed: ");
}
} }
else else
{
free(b);
return logclose(image, f, image->file_name, return logclose(image, f, image->file_name,
": read failed: "); ": out of memory: ");
}
} }
else else
return logclose(image, f, image->file_name, return logclose(image, f, image->file_name,
": out of memory: "); ": file too big for this architecture: ");
/* cb is the length of the file as a (long) and
* this is greater than the maximum amount of
* memory that can be requested from malloc.
*/
} }
else if (cb == 0) else if (cb == 0)

View File

@ -8,8 +8,8 @@
* For conditions of distribution and use, see the disclaimer * For conditions of distribution and use, see the disclaimer
* and license in png.h * and license in png.h
* *
* Tool to check and fix the zlib inflate 'too far back' problem, see the usage * Tool to check and fix the zlib inflate 'too far back' problem.
* message for more information. * See the usage message for more information.
*/ */
#include <stdlib.h> #include <stdlib.h>
#include <stdio.h> #include <stdio.h>

View File

@ -1,6 +1,6 @@
libpng-manual.txt - A description on how to use and modify libpng libpng-manual.txt - A description on how to use and modify libpng
libpng version 1.6.15 - November 20, 2014 libpng version 1.6.16 - December 22, 2014
Updated and distributed by Glenn Randers-Pehrson Updated and distributed by Glenn Randers-Pehrson
<glennrp at users.sourceforge.net> <glennrp at users.sourceforge.net>
Copyright (c) 1998-2014 Glenn Randers-Pehrson Copyright (c) 1998-2014 Glenn Randers-Pehrson
@ -11,7 +11,7 @@ libpng-manual.txt - A description on how to use and modify libpng
Based on: Based on:
libpng versions 0.97, January 1998, through 1.6.15 - November 20, 2014 libpng versions 0.97, January 1998, through 1.6.16 - December 22, 2014
Updated and distributed by Glenn Randers-Pehrson Updated and distributed by Glenn Randers-Pehrson
Copyright (c) 1998-2014 Glenn Randers-Pehrson Copyright (c) 1998-2014 Glenn Randers-Pehrson
@ -648,15 +648,12 @@ User limits
The PNG specification allows the width and height of an image to be as The PNG specification allows the width and height of an image to be as
large as 2^31-1 (0x7fffffff), or about 2.147 billion rows and columns. large as 2^31-1 (0x7fffffff), or about 2.147 billion rows and columns.
Since very few applications really need to process such large images,
we have imposed an arbitrary 1-million limit on rows and columns.
Larger images will be rejected immediately with a png_error() call. If Larger images will be rejected immediately with a png_error() call. If
you wish to change this limit, you can use you wish to reduce these limits, you can use
png_set_user_limits(png_ptr, width_max, height_max); png_set_user_limits(png_ptr, width_max, height_max);
to set your own limits, or use width_max = height_max = 0x7fffffffL to set your own limits (libpng may reject some very wide images
to allow all valid dimensions (libpng may reject some very large images
anyway because of potential buffer overflow conditions). anyway because of potential buffer overflow conditions).
You should put this statement after you create the PNG structure and You should put this statement after you create the PNG structure and
@ -5037,8 +5034,8 @@ where "rp" indicates a "restricted pointer".
Error detection in some chunks has improved; in particular the iCCP chunk Error detection in some chunks has improved; in particular the iCCP chunk
reader now does pretty complete validation of the basic format. Some bad reader now does pretty complete validation of the basic format. Some bad
profiles that were previously accepted are now accepted with a warning or profiles that were previously accepted are now accepted with a warning or
rejected, depending upon the png_set_benign_errors() setting, in particular the rejected, depending upon the png_set_benign_errors() setting, in particular
very old broken Microsoft/HP 3144-byte sRGB profile. Starting with the very old broken Microsoft/HP 3144-byte sRGB profile. Starting with
libpng-1.6.11, recognizing and checking sRGB profiles can be avoided by libpng-1.6.11, recognizing and checking sRGB profiles can be avoided by
means of means of
@ -5048,8 +5045,8 @@ means of
PNG_OPTION_ON); PNG_OPTION_ON);
#endif #endif
It's not a good idea to do this if you are using the "simplified API", It's not a good idea to do this if you are using the new "simplified API",
which needs to be able to recognize an sRGB profile conveyed via the iCCP which needs to be able to recognize sRGB profiles conveyed via the iCCP
chunk. chunk.
The PNG spec requirement that only grayscale profiles may appear in images The PNG spec requirement that only grayscale profiles may appear in images
@ -5277,13 +5274,13 @@ Other rules can be inferred by inspecting the libpng source.
XVI. Y2K Compliance in libpng XVI. Y2K Compliance in libpng
November 20, 2014 December 22, 2014
Since the PNG Development group is an ad-hoc body, we can't make Since the PNG Development group is an ad-hoc body, we can't make
an official declaration. an official declaration.
This is your unofficial assurance that libpng from version 0.71 and This is your unofficial assurance that libpng from version 0.71 and
upward through 1.6.15 are Y2K compliant. It is my belief that earlier upward through 1.6.16 are Y2K compliant. It is my belief that earlier
versions were also Y2K compliant. versions were also Y2K compliant.
Libpng only has two year fields. One is a 2-byte unsigned integer Libpng only has two year fields. One is a 2-byte unsigned integer

View File

@ -1,6 +1,6 @@
.TH LIBPNG 3 "November 20, 2014" .TH LIBPNG 3 "December 22, 2014"
.SH NAME .SH NAME
libpng \- Portable Network Graphics (PNG) Reference Library 1.6.15 libpng \- Portable Network Graphics (PNG) Reference Library 1.6.16
.SH SYNOPSIS .SH SYNOPSIS
\fB \fB
#include <png.h>\fP #include <png.h>\fP
@ -504,7 +504,7 @@ Following is a copy of the libpng-manual.txt file that accompanies libpng.
.SH LIBPNG.TXT .SH LIBPNG.TXT
libpng-manual.txt - A description on how to use and modify libpng libpng-manual.txt - A description on how to use and modify libpng
libpng version 1.6.15 - November 20, 2014 libpng version 1.6.16 - December 22, 2014
Updated and distributed by Glenn Randers-Pehrson Updated and distributed by Glenn Randers-Pehrson
<glennrp at users.sourceforge.net> <glennrp at users.sourceforge.net>
Copyright (c) 1998-2014 Glenn Randers-Pehrson Copyright (c) 1998-2014 Glenn Randers-Pehrson
@ -515,7 +515,7 @@ libpng-manual.txt - A description on how to use and modify libpng
Based on: Based on:
libpng versions 0.97, January 1998, through 1.6.15 - November 20, 2014 libpng versions 0.97, January 1998, through 1.6.16 - December 22, 2014
Updated and distributed by Glenn Randers-Pehrson Updated and distributed by Glenn Randers-Pehrson
Copyright (c) 1998-2014 Glenn Randers-Pehrson Copyright (c) 1998-2014 Glenn Randers-Pehrson
@ -1152,15 +1152,12 @@ callback function:
The PNG specification allows the width and height of an image to be as The PNG specification allows the width and height of an image to be as
large as 2^(31\-1 (0x7fffffff), or about 2.147 billion rows and columns. large as 2^(31\-1 (0x7fffffff), or about 2.147 billion rows and columns.
Since very few applications really need to process such large images,
we have imposed an arbitrary 1-million limit on rows and columns.
Larger images will be rejected immediately with a png_error() call. If Larger images will be rejected immediately with a png_error() call. If
you wish to change this limit, you can use you wish to reduce these limits, you can use
png_set_user_limits(png_ptr, width_max, height_max); png_set_user_limits(png_ptr, width_max, height_max);
to set your own limits, or use width_max = height_max = 0x7fffffffL to set your own limits (libpng may reject some very wide images
to allow all valid dimensions (libpng may reject some very large images
anyway because of potential buffer overflow conditions). anyway because of potential buffer overflow conditions).
You should put this statement after you create the PNG structure and You should put this statement after you create the PNG structure and
@ -5541,8 +5538,8 @@ where "rp" indicates a "restricted pointer".
Error detection in some chunks has improved; in particular the iCCP chunk Error detection in some chunks has improved; in particular the iCCP chunk
reader now does pretty complete validation of the basic format. Some bad reader now does pretty complete validation of the basic format. Some bad
profiles that were previously accepted are now accepted with a warning or profiles that were previously accepted are now accepted with a warning or
rejected, depending upon the png_set_benign_errors() setting, in particular the rejected, depending upon the png_set_benign_errors() setting, in particular
very old broken Microsoft/HP 3144-byte sRGB profile. Starting with the very old broken Microsoft/HP 3144-byte sRGB profile. Starting with
libpng-1.6.11, recognizing and checking sRGB profiles can be avoided by libpng-1.6.11, recognizing and checking sRGB profiles can be avoided by
means of means of
@ -5552,8 +5549,8 @@ means of
PNG_OPTION_ON); PNG_OPTION_ON);
#endif #endif
It's not a good idea to do this if you are using the "simplified API", It's not a good idea to do this if you are using the new "simplified API",
which needs to be able to recognize an sRGB profile conveyed via the iCCP which needs to be able to recognize sRGB profiles conveyed via the iCCP
chunk. chunk.
The PNG spec requirement that only grayscale profiles may appear in images The PNG spec requirement that only grayscale profiles may appear in images
@ -5781,13 +5778,13 @@ Other rules can be inferred by inspecting the libpng source.
.SH XVI. Y2K Compliance in libpng .SH XVI. Y2K Compliance in libpng
November 20, 2014 December 22, 2014
Since the PNG Development group is an ad-hoc body, we can't make Since the PNG Development group is an ad-hoc body, we can't make
an official declaration. an official declaration.
This is your unofficial assurance that libpng from version 0.71 and This is your unofficial assurance that libpng from version 0.71 and
upward through 1.6.15 are Y2K compliant. It is my belief that earlier upward through 1.6.16 are Y2K compliant. It is my belief that earlier
versions were also Y2K compliant. versions were also Y2K compliant.
Libpng only has two year fields. One is a 2-byte unsigned integer Libpng only has two year fields. One is a 2-byte unsigned integer
@ -6036,6 +6033,9 @@ the first widely used release:
1.6.15beta01-08 16 10615 16.so.16.15[.0] 1.6.15beta01-08 16 10615 16.so.16.15[.0]
1.6.15rc01-03 16 10615 16.so.16.15[.0] 1.6.15rc01-03 16 10615 16.so.16.15[.0]
1.6.15 16 10615 16.so.16.15[.0] 1.6.15 16 10615 16.so.16.15[.0]
1.6.16beta01-03 16 10616 16.so.16.16[.0]
1.6.16rc01-02 16 10616 16.so.16.16[.0]
1.6.16 16 10616 16.so.16.16[.0]
Henceforth the source version will match the shared-library minor Henceforth the source version will match the shared-library minor
and patch numbers; the shared-library major version number will be and patch numbers; the shared-library major version number will be
@ -6092,7 +6092,7 @@ possible without all of you.
Thanks to Frank J. T. Wojcik for helping with the documentation. Thanks to Frank J. T. Wojcik for helping with the documentation.
Libpng version 1.6.15 - November 20, 2014: Libpng version 1.6.16 - December 22, 2014:
Initially created in 1995 by Guy Eric Schalnat, then of Group 42, Inc. Initially created in 1995 by Guy Eric Schalnat, then of Group 42, Inc.
Currently maintained by Glenn Randers-Pehrson (glennrp at users.sourceforge.net). Currently maintained by Glenn Randers-Pehrson (glennrp at users.sourceforge.net).
@ -6115,7 +6115,7 @@ this sentence.
This code is released under the libpng license. This code is released under the libpng license.
libpng versions 1.2.6, August 15, 2004, through 1.6.15, November 20, 2014, are libpng versions 1.2.6, August 15, 2004, through 1.6.16, December 22, 2014, are
Copyright (c) 2004,2006-2014 Glenn Randers-Pehrson, and are Copyright (c) 2004,2006-2014 Glenn Randers-Pehrson, and are
distributed according to the same disclaimer and license as libpng-1.2.5 distributed according to the same disclaimer and license as libpng-1.2.5
with the following individual added to the list of Contributing Authors with the following individual added to the list of Contributing Authors
@ -6214,7 +6214,7 @@ certification mark of the Open Source Initiative.
Glenn Randers-Pehrson Glenn Randers-Pehrson
glennrp at users.sourceforge.net glennrp at users.sourceforge.net
November 20, 2014 December 22, 2014
.\" end of man page .\" end of man page

View File

@ -1,6 +1,6 @@
.TH LIBPNGPF 3 "November 20, 2014" .TH LIBPNGPF 3 "December 22, 2014"
.SH NAME .SH NAME
libpng \- Portable Network Graphics (PNG) Reference Library 1.6.15 libpng \- Portable Network Graphics (PNG) Reference Library 1.6.16
(private functions) (private functions)
.SH SYNOPSIS .SH SYNOPSIS
\fB#include \fI"pngpriv.h" \fB#include \fI"pngpriv.h"

2
png.5
View File

@ -1,4 +1,4 @@
.TH PNG 5 "November 20, 2014" .TH PNG 5 "December 22, 2014"
.SH NAME .SH NAME
png \- Portable Network Graphics (PNG) format png \- Portable Network Graphics (PNG) format
.SH DESCRIPTION .SH DESCRIPTION

49
png.c
View File

@ -1,7 +1,7 @@
/* png.c - location for general purpose libpng functions /* png.c - location for general purpose libpng functions
* *
* Last changed in libpng 1.6.15 [November 20, 2014] * Last changed in libpng 1.6.16 [December 22, 2014]
* Copyright (c) 1998-2014 Glenn Randers-Pehrson * Copyright (c) 1998-2014 Glenn Randers-Pehrson
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger) * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.) * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
@ -14,7 +14,7 @@
#include "pngpriv.h" #include "pngpriv.h"
/* Generate a compiler error if there is an old png.h in the search path. */ /* Generate a compiler error if there is an old png.h in the search path. */
typedef png_libpng_version_1_6_15 Your_png_h_is_not_version_1_6_15; typedef png_libpng_version_1_6_16 Your_png_h_is_not_version_1_6_16;
/* Tells libpng that we have already handled the first "num_bytes" bytes /* 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 * of the PNG file signature. If the PNG data is embedded into another
@ -769,13 +769,13 @@ png_get_copyright(png_const_structrp png_ptr)
#else #else
# ifdef __STDC__ # ifdef __STDC__
return PNG_STRING_NEWLINE \ return PNG_STRING_NEWLINE \
"libpng version 1.6.15 - November 20, 2014" PNG_STRING_NEWLINE \ "libpng version 1.6.16 - December 22, 2014" PNG_STRING_NEWLINE \
"Copyright (c) 1998-2014 Glenn Randers-Pehrson" PNG_STRING_NEWLINE \ "Copyright (c) 1998-2014 Glenn Randers-Pehrson" PNG_STRING_NEWLINE \
"Copyright (c) 1996-1997 Andreas Dilger" PNG_STRING_NEWLINE \ "Copyright (c) 1996-1997 Andreas Dilger" PNG_STRING_NEWLINE \
"Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc." \ "Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc." \
PNG_STRING_NEWLINE; PNG_STRING_NEWLINE;
# else # else
return "libpng version 1.6.15 - November 20, 2014\ return "libpng version 1.6.16 - December 22, 2014\
Copyright (c) 1998-2014 Glenn Randers-Pehrson\ Copyright (c) 1998-2014 Glenn Randers-Pehrson\
Copyright (c) 1996-1997 Andreas Dilger\ Copyright (c) 1996-1997 Andreas Dilger\
Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc."; Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc.";
@ -1075,7 +1075,7 @@ png_colorspace_set_gamma(png_const_structrp png_ptr,
png_colorspacerp colorspace, png_fixed_point gAMA) png_colorspacerp colorspace, png_fixed_point gAMA)
{ {
/* Changed in libpng-1.5.4 to limit the values to ensure overflow can't /* Changed in libpng-1.5.4 to limit the values to ensure overflow can't
* occur. Since the fixed point representation is assymetrical it is * occur. Since the fixed point representation is asymetrical it is
* possible for 1/gamma to overflow the limit of 21474 and this means the * possible for 1/gamma to overflow the limit of 21474 and this means the
* gamma value must be at least 5/100000 and hence at most 20000.0. For * gamma value must be at least 5/100000 and hence at most 20000.0. For
* safety the limits here are a little narrower. The values are 0.00016 to * safety the limits here are a little narrower. The values are 0.00016 to
@ -1324,7 +1324,7 @@ png_XYZ_from_xy(png_XYZ *XYZ, const png_xy *xy)
* (1/white-y), so we can immediately see that as white-y approaches 0 the * (1/white-y), so we can immediately see that as white-y approaches 0 the
* accuracy inherent in the cHRM chunk drops off substantially. * accuracy inherent in the cHRM chunk drops off substantially.
* *
* libpng arithmetic: a simple invertion of the above equations * libpng arithmetic: a simple inversion of the above equations
* ------------------------------------------------------------ * ------------------------------------------------------------
* *
* white_scale = 1/white-y * white_scale = 1/white-y
@ -1817,7 +1817,7 @@ png_icc_profile_error(png_const_structrp png_ptr, png_colorspacerp colorspace,
PNG_UNUSED(pos) PNG_UNUSED(pos)
/* This is recoverable, but make it unconditionally an app_error on write to /* This is recoverable, but make it unconditionally an app_error on write to
* avoid writing invalid ICC profiles into PNG files. (I.e. we handle them * avoid writing invalid ICC profiles into PNG files (i.e., we handle them
* on read, with a warning, but on write unless the app turns off * on read, with a warning, but on write unless the app turns off
* application errors the PNG won't be written.) * application errors the PNG won't be written.)
*/ */
@ -1836,7 +1836,7 @@ png_colorspace_set_sRGB(png_const_structrp png_ptr, png_colorspacerp colorspace,
/* sRGB sets known gamma, end points and (from the chunk) intent. */ /* sRGB sets known gamma, end points and (from the chunk) intent. */
/* IMPORTANT: these are not necessarily the values found in an ICC profile /* IMPORTANT: these are not necessarily the values found in an ICC profile
* because ICC profiles store values adapted to a D50 environment; it is * because ICC profiles store values adapted to a D50 environment; it is
* expected that the ICC profile mediaWhitePointTag will be D50, see the * expected that the ICC profile mediaWhitePointTag will be D50; see the
* checks and code elsewhere to understand this better. * checks and code elsewhere to understand this better.
* *
* These XYZ values, which are accurate to 5dp, produce rgb to gray * These XYZ values, which are accurate to 5dp, produce rgb to gray
@ -2461,6 +2461,17 @@ png_colorspace_set_rgb_coefficients(png_structrp png_ptr)
#endif /* COLORSPACE */ #endif /* COLORSPACE */
#ifdef __GNUC__
/* This exists solely to work round a warning from GNU C. */
static int /* PRIVATE */
png_gt(size_t a, size_t b)
{
return a > b;
}
#else
# define png_gt(a,b) ((a) > (b))
#endif
void /* PRIVATE */ void /* PRIVATE */
png_check_IHDR(png_const_structrp png_ptr, png_check_IHDR(png_const_structrp png_ptr,
png_uint_32 width, png_uint_32 height, int bit_depth, png_uint_32 width, png_uint_32 height, int bit_depth,
@ -2480,6 +2491,28 @@ png_check_IHDR(png_const_structrp png_ptr,
png_warning(png_ptr, "Invalid image width in IHDR"); png_warning(png_ptr, "Invalid image width in IHDR");
error = 1; error = 1;
} }
else if (png_gt(width,
(PNG_SIZE_MAX >> 3) /* 8-byte RGBA pixels */
- 48 /* big_row_buf hack */
- 1 /* filter byte */
- 7*8 /* rounding width to multiple of 8 pix */
- 8)) /* extra max_pixel_depth pad */
{
/* The size of the row must be within the limits of this architecture.
* Because the read code can perform arbitrary transformations the
* maximum size is checked here. Because the code in png_read_start_row
* adds extra space "for safety's sake" in several places a conservative
* limit is used here.
*
* NOTE: it would be far better to check the size that is actually used,
* but the effect in the real world is minor and the changes are more
* extensive, therefore much more dangerous and much more difficult to
* write in a way that avoids compiler warnings.
*/
png_warning(png_ptr, "Image width is too large for this architecture");
error = 1;
}
else else
{ {
# ifdef PNG_SET_USER_LIMITS_SUPPORTED # ifdef PNG_SET_USER_LIMITS_SUPPORTED

23
png.h
View File

@ -1,7 +1,7 @@
/* png.h - header file for PNG reference library /* png.h - header file for PNG reference library
* *
* libpng version 1.6.15, November 20, 2014 * libpng version 1.6.16, December 22, 2014
* Copyright (c) 1998-2014 Glenn Randers-Pehrson * Copyright (c) 1998-2014 Glenn Randers-Pehrson
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger) * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.) * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
@ -11,7 +11,7 @@
* Authors and maintainers: * Authors and maintainers:
* libpng versions 0.71, May 1995, through 0.88, January 1996: Guy Schalnat * libpng versions 0.71, May 1995, through 0.88, January 1996: Guy Schalnat
* libpng versions 0.89c, June 1996, through 0.96, May 1997: Andreas Dilger * libpng versions 0.89c, June 1996, through 0.96, May 1997: Andreas Dilger
* libpng versions 0.97, January 1998, through 1.6.15, November 20, 2014: Glenn * libpng versions 0.97, January 1998, through 1.6.16, December 22, 2014: Glenn
* See also "Contributing Authors", below. * See also "Contributing Authors", below.
* *
* Note about libpng version numbers: * Note about libpng version numbers:
@ -209,6 +209,9 @@
* 1.6.15beta01-08 16 10615 16.so.16.15[.0] * 1.6.15beta01-08 16 10615 16.so.16.15[.0]
* 1.6.15rc01-03 16 10615 16.so.16.15[.0] * 1.6.15rc01-03 16 10615 16.so.16.15[.0]
* 1.6.15 16 10615 16.so.16.15[.0] * 1.6.15 16 10615 16.so.16.15[.0]
* 1.6.16beta01-03 16 10616 16.so.16.16[.0]
* 1.6.16rc01-02 16 10616 16.so.16.16[.0]
* 1.6.16 16 10616 16.so.16.16[.0]
* *
* Henceforth the source version will match the shared-library major * Henceforth the source version will match the shared-library major
* and minor numbers; the shared-library major version number will be * and minor numbers; the shared-library major version number will be
@ -240,7 +243,7 @@
* *
* This code is released under the libpng license. * This code is released under the libpng license.
* *
* libpng versions 1.2.6, August 15, 2004, through 1.6.15, November 20, 2014, are * libpng versions 1.2.6, August 15, 2004, through 1.6.16, December 22, 2014, are
* Copyright (c) 2004, 2006-2014 Glenn Randers-Pehrson, and are * Copyright (c) 2004, 2006-2014 Glenn Randers-Pehrson, and are
* distributed according to the same disclaimer and license as libpng-1.2.5 * distributed according to the same disclaimer and license as libpng-1.2.5
* with the following individual added to the list of Contributing Authors: * with the following individual added to the list of Contributing Authors:
@ -352,13 +355,13 @@
* Y2K compliance in libpng: * Y2K compliance in libpng:
* ========================= * =========================
* *
* November 20, 2014 * December 22, 2014
* *
* Since the PNG Development group is an ad-hoc body, we can't make * Since the PNG Development group is an ad-hoc body, we can't make
* an official declaration. * an official declaration.
* *
* This is your unofficial assurance that libpng from version 0.71 and * This is your unofficial assurance that libpng from version 0.71 and
* upward through 1.6.15 are Y2K compliant. It is my belief that * upward through 1.6.16 are Y2K compliant. It is my belief that
* earlier versions were also Y2K compliant. * earlier versions were also Y2K compliant.
* *
* Libpng only has two year fields. One is a 2-byte unsigned integer * Libpng only has two year fields. One is a 2-byte unsigned integer
@ -420,9 +423,9 @@
*/ */
/* Version information for png.h - this should match the version in png.c */ /* Version information for png.h - this should match the version in png.c */
#define PNG_LIBPNG_VER_STRING "1.6.15" #define PNG_LIBPNG_VER_STRING "1.6.16"
#define PNG_HEADER_VERSION_STRING \ #define PNG_HEADER_VERSION_STRING \
" libpng version 1.6.15 - November 20, 2014\n" " libpng version 1.6.16 - December 22, 2014\n"
#define PNG_LIBPNG_VER_SONUM 16 #define PNG_LIBPNG_VER_SONUM 16
#define PNG_LIBPNG_VER_DLLNUM 16 #define PNG_LIBPNG_VER_DLLNUM 16
@ -430,7 +433,7 @@
/* These should match the first 3 components of PNG_LIBPNG_VER_STRING: */ /* These should match the first 3 components of PNG_LIBPNG_VER_STRING: */
#define PNG_LIBPNG_VER_MAJOR 1 #define PNG_LIBPNG_VER_MAJOR 1
#define PNG_LIBPNG_VER_MINOR 6 #define PNG_LIBPNG_VER_MINOR 6
#define PNG_LIBPNG_VER_RELEASE 15 #define PNG_LIBPNG_VER_RELEASE 16
/* This should match the numeric part of the final component of /* This should match the numeric part of the final component of
* PNG_LIBPNG_VER_STRING, omitting any leading zero: * PNG_LIBPNG_VER_STRING, omitting any leading zero:
@ -461,7 +464,7 @@
* version 1.0.0 was mis-numbered 100 instead of 10000). From * 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 * version 1.0.1 it's xxyyzz, where x=major, y=minor, z=release
*/ */
#define PNG_LIBPNG_VER 10615 /* 1.6.15 */ #define PNG_LIBPNG_VER 10616 /* 1.6.16 */
/* Library configuration: these options cannot be changed after /* Library configuration: these options cannot be changed after
* the library has been built. * the library has been built.
@ -566,7 +569,7 @@ extern "C" {
/* This triggers a compiler error in png.c, if png.c and png.h /* This triggers a compiler error in png.c, if png.c and png.h
* do not agree upon the version number. * do not agree upon the version number.
*/ */
typedef char* png_libpng_version_1_6_15; typedef char* png_libpng_version_1_6_16;
/* Basic control structions. Read libpng-manual.txt or libpng.3 for more info. /* Basic control structions. Read libpng-manual.txt or libpng.3 for more info.
* *

View File

@ -1,7 +1,7 @@
/* pngconf.h - machine configurable file for libpng /* pngconf.h - machine configurable file for libpng
* *
* libpng version 1.6.15,November 20, 2014 * libpng version 1.6.16,December 22, 2014
* *
* Copyright (c) 1998-2014 Glenn Randers-Pehrson * Copyright (c) 1998-2014 Glenn Randers-Pehrson
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger) * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)

View File

@ -788,6 +788,7 @@ png_inflate_read(png_structrp png_ptr, png_bytep read_buffer, uInt read_size,
#endif #endif
/* Read and check the IDHR chunk */ /* Read and check the IDHR chunk */
void /* PRIVATE */ void /* PRIVATE */
png_handle_IHDR(png_structrp png_ptr, png_inforp info_ptr, png_uint_32 length) png_handle_IHDR(png_structrp png_ptr, png_inforp info_ptr, png_uint_32 length)
{ {
@ -852,8 +853,7 @@ png_handle_IHDR(png_structrp png_ptr, png_inforp info_ptr, png_uint_32 length)
} }
/* Set up other useful info */ /* Set up other useful info */
png_ptr->pixel_depth = (png_byte)(png_ptr->bit_depth * png_ptr->pixel_depth = (png_byte)(png_ptr->bit_depth * png_ptr->channels);
png_ptr->channels);
png_ptr->rowbytes = PNG_ROWBYTES(png_ptr->pixel_depth, png_ptr->width); png_ptr->rowbytes = PNG_ROWBYTES(png_ptr->pixel_depth, png_ptr->width);
png_debug1(3, "bit_depth = %d", png_ptr->bit_depth); png_debug1(3, "bit_depth = %d", png_ptr->bit_depth);
png_debug1(3, "channels = %d", png_ptr->channels); png_debug1(3, "channels = %d", png_ptr->channels);
@ -3003,7 +3003,7 @@ png_combine_row(png_const_structrp png_ptr, png_bytep dp, int display)
{ {
unsigned int pixel_depth = png_ptr->transformed_pixel_depth; unsigned int pixel_depth = png_ptr->transformed_pixel_depth;
png_const_bytep sp = png_ptr->row_buf + 1; png_const_bytep sp = png_ptr->row_buf + 1;
png_uint_32 row_width = png_ptr->width; png_alloc_size_t row_width = png_ptr->width;
unsigned int pass = png_ptr->pass; unsigned int pass = png_ptr->pass;
png_bytep end_ptr = 0; png_bytep end_ptr = 0;
png_byte end_byte = 0; png_byte end_byte = 0;
@ -3278,7 +3278,7 @@ png_combine_row(png_const_structrp png_ptr, png_bytep dp, int display)
/* But don't allow this number to exceed the actual row width. */ /* But don't allow this number to exceed the actual row width. */
if (bytes_to_copy > row_width) if (bytes_to_copy > row_width)
bytes_to_copy = row_width; bytes_to_copy = (unsigned int)/*SAFE*/row_width;
} }
else /* normal row; Adam7 only ever gives us one pixel to copy. */ else /* normal row; Adam7 only ever gives us one pixel to copy. */
@ -3458,7 +3458,7 @@ png_combine_row(png_const_structrp png_ptr, png_bytep dp, int display)
dp += bytes_to_jump; dp += bytes_to_jump;
row_width -= bytes_to_jump; row_width -= bytes_to_jump;
if (bytes_to_copy > row_width) if (bytes_to_copy > row_width)
bytes_to_copy = row_width; bytes_to_copy = (unsigned int)/*SAFE*/row_width;
} }
} }
@ -4228,7 +4228,7 @@ png_read_start_row(png_structrp png_ptr)
max_pixel_depth = png_ptr->pixel_depth; max_pixel_depth = png_ptr->pixel_depth;
/* WARNING: * png_read_transform_info (pngrtran.c) performs a simpliar set of /* WARNING: * png_read_transform_info (pngrtran.c) performs a simpler set of
* calculations to calculate the final pixel depth, then * calculations to calculate the final pixel depth, then
* png_do_read_transforms actually does the transforms. This means that the * png_do_read_transforms actually does the transforms. This means that the
* code which effectively calculates this value is actually repeated in three * code which effectively calculates this value is actually repeated in three

View File

@ -2008,4 +2008,4 @@ main(void)
#endif #endif
/* Generate a compiler error if there is an old png.h in the search path. */ /* Generate a compiler error if there is an old png.h in the search path. */
typedef png_libpng_version_1_6_15 Your_png_h_is_not_version_1_6_15; typedef png_libpng_version_1_6_16 Your_png_h_is_not_version_1_6_16;

View File

@ -1,7 +1,7 @@
VisualStudio instructions VisualStudio instructions
libpng version 1.6.15 - November 20, 2014 libpng version 1.6.16 - December 22, 2014
Copyright (c) 1998-2010 Glenn Randers-Pehrson Copyright (c) 1998-2010 Glenn Randers-Pehrson

View File

@ -2,7 +2,7 @@
<!-- <!--
* zlib.props - location of zlib source * zlib.props - location of zlib source
* *
* libpng version 1.6.15 - November 20, 2014 * libpng version 1.6.16 - December 22, 2014
* *
* Copyright (c) 1998-2011 Glenn Randers-Pehrson * Copyright (c) 1998-2011 Glenn Randers-Pehrson
* *

View File

@ -1,9 +1,9 @@
Makefiles for libpng version 1.6.15 - November 20, 2014 Makefiles for libpng version 1.6.16 - December 22, 2014
pnglibconf.h.prebuilt => Stores configuration settings pnglibconf.h.prebuilt => Stores configuration settings
makefile.linux => Linux/ELF makefile makefile.linux => Linux/ELF makefile
(gcc, creates libpng16.so.16.1.6.15) (gcc, creates libpng16.so.16.1.6.16)
makefile.gcc => Generic makefile (gcc, creates static libpng.a) makefile.gcc => Generic makefile (gcc, creates static libpng.a)
makefile.knr => Archaic UNIX Makefile that converts files with makefile.knr => Archaic UNIX Makefile that converts files with
ansi2knr (Requires ansi2knr.c from 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.os2 => OS/2 Makefile (gcc and emx, requires libpng.def)
makefile.sco => For SCO OSr5 ELF and Unixware 7 with Native cc makefile.sco => For SCO OSr5 ELF and Unixware 7 with Native cc
makefile.sggcc => Silicon Graphics (gcc, makefile.sggcc => Silicon Graphics (gcc,
creates libpng16.so.16.1.6.15) creates libpng16.so.16.1.6.16)
makefile.sgi => Silicon Graphics IRIX makefile (cc, creates static lib) makefile.sgi => Silicon Graphics IRIX makefile (cc, creates static lib)
makefile.solaris => Solaris 2.X makefile (gcc, makefile.solaris => Solaris 2.X makefile (gcc,
creates libpng16.so.16.1.6.15) creates libpng16.so.16.1.6.16)
makefile.so9 => Solaris 9 makefile (gcc, makefile.so9 => Solaris 9 makefile (gcc,
creates libpng16.so.16.1.6.15) creates libpng16.so.16.1.6.16)
makefile.std => Generic UNIX makefile (cc, creates static libpng.a) makefile.std => Generic UNIX makefile (cc, creates static libpng.a)
makefile.sunos => Sun makefile makefile.sunos => Sun makefile
makefile.32sunu => Sun Ultra 32-bit makefile makefile.32sunu => Sun Ultra 32-bit makefile

View File

@ -1,7 +1,7 @@
/* def.dfn - define format of libpng.def /* def.c - define format of libpng.def
* *
* Last changed in libpng version 1.5.7 [December 15, 2011] * Last changed in libpng version 1.6.16 [December 22, 2014]
* Copyright (c) 2010-2011 Glenn Randers-Pehrson * Copyright (c) 2011-2014 Glenn Randers-Pehrson
* *
* This code is released under the libpng license. * This code is released under the libpng license.
* For conditions of distribution and use, see the disclaimer * For conditions of distribution and use, see the disclaimer
@ -21,7 +21,7 @@ PNG_DFN "OS2 DESCRIPTION "PNG image compression library""
PNG_DFN "OS2 CODE PRELOAD MOVEABLE DISCARDABLE" PNG_DFN "OS2 CODE PRELOAD MOVEABLE DISCARDABLE"
PNG_DFN "" PNG_DFN ""
PNG_DFN "EXPORTS" PNG_DFN "EXPORTS"
PNG_DFN ";Version 1.6.15" PNG_DFN ";Version 1.6.16"
#define PNG_EXPORTA(ordinal, type, name, args, attributes)\ #define PNG_EXPORTA(ordinal, type, name, args, attributes)\
PNG_DFN "@" SYMBOL_PREFIX "@@" name "@" PNG_DFN "@" SYMBOL_PREFIX "@@" name "@"

View File

@ -1,8 +1,8 @@
/* intprefix.dfn - generate an unprefixed internal symbol list /* intprefix.c - generate an unprefixed internal symbol list
* *
* Last changed in libpng version 1.6.0 [January 30, 2012] * Last changed in libpng version 1.6.16 [December 22, 2014]
* Copyright (c) 2012 Glenn Randers-Pehrson * Copyright (c) 2013-2014 Glenn Randers-Pehrson
* *
* This code is released under the libpng license. * This code is released under the libpng license.
* For conditions of distribution and use, see the disclaimer * For conditions of distribution and use, see the disclaimer

View File

@ -11,7 +11,7 @@
# Modeled after libxml-config. # Modeled after libxml-config.
version=1.6.15 version=1.6.16
prefix="" prefix=""
libdir="" libdir=""
libs="" libs=""

View File

@ -5,6 +5,6 @@ includedir=@includedir@/libpng16
Name: libpng Name: libpng
Description: Loads and saves PNG files Description: Loads and saves PNG files
Version: 1.6.15 Version: 1.6.16
Libs: -L${libdir} -lpng16 Libs: -L${libdir} -lpng16
Cflags: -I${includedir} Cflags: -I${includedir}

View File

@ -23,7 +23,7 @@
VERMAJ = 1 VERMAJ = 1
VERMIN = 6 VERMIN = 6
VERMIC = 15 VERMIC = 16
VER = $(VERMAJ).$(VERMIN).$(VERMIC) VER = $(VERMAJ).$(VERMIN).$(VERMIC)
NAME = libpng NAME = libpng
PACKAGE = $(NAME)-$(VER) PACKAGE = $(NAME)-$(VER)

View File

@ -10,7 +10,7 @@
# Library name: # Library name:
LIBNAME = libpng16 LIBNAME = libpng16
PNGMAJ = 16 PNGMAJ = 16
RELEASE = 15 RELEASE = 16
# Shared library names: # Shared library names:
LIBSO=$(LIBNAME).so LIBSO=$(LIBNAME).so

View File

@ -18,7 +18,7 @@ exec_prefix=$(prefix)
# Library name: # Library name:
LIBNAME = libpng16 LIBNAME = libpng16
PNGMAJ = 16 PNGMAJ = 16
RELEASE = 15 RELEASE = 16
# Shared library names: # Shared library names:
LIBSO=$(LIBNAME).dll LIBSO=$(LIBNAME).dll

View File

@ -17,7 +17,7 @@ INCSDIR=${LOCALBASE}/include/libpng16
LIB= png16 LIB= png16
SHLIB_MAJOR= 0 SHLIB_MAJOR= 0
SHLIB_MINOR= 1.6.15 SHLIB_MINOR= 1.6.16
SRCS= png.c pngset.c pngget.c pngrutil.c pngtrans.c pngwutil.c \ SRCS= png.c pngset.c pngget.c pngrutil.c pngtrans.c pngwutil.c \
pngread.c pngrio.c pngwio.c pngwrite.c pngrtran.c \ pngread.c pngrio.c pngwio.c pngwrite.c pngrtran.c \
pngwtran.c pngmem.c pngerror.c pngpread.c pngwtran.c pngmem.c pngerror.c pngpread.c

View File

@ -17,7 +17,7 @@ INCSDIR=${LOCALBASE}/include
LIB= png LIB= png
SHLIB_MAJOR= 16 SHLIB_MAJOR= 16
SHLIB_MINOR= 1.6.15 SHLIB_MINOR= 1.6.16
SRCS= png.c pngset.c pngget.c pngrutil.c pngtrans.c pngwutil.c \ SRCS= png.c pngset.c pngget.c pngrutil.c pngtrans.c pngwutil.c \
pngread.c pngrio.c pngwio.c pngwrite.c pngrtran.c \ pngread.c pngrio.c pngwio.c pngwrite.c pngrtran.c \
pngwtran.c pngmem.c pngerror.c pngpread.c pngwtran.c pngmem.c pngerror.c pngpread.c

View File

@ -11,7 +11,7 @@ LIBDIR= ${PREFIX}/lib
MANDIR= ${PREFIX}/man/cat MANDIR= ${PREFIX}/man/cat
SHLIB_MAJOR= 16 SHLIB_MAJOR= 16
SHLIB_MINOR= 1.6.15 SHLIB_MINOR= 1.6.16
LIB= png LIB= png
SRCS= png.c pngerror.c pngget.c pngmem.c pngpread.c \ SRCS= png.c pngerror.c pngget.c pngmem.c pngpread.c \

View File

@ -303,7 +303,7 @@ option BENIGN_READ_ERRORS requires BENIGN_ERRORS
option MNG_FEATURES option MNG_FEATURES
# Arithmetic options, the first is the big switch that chooses between internal # Arithmetic options, the first is the big switch that chooses between internal
# floating and fixed point arithmetic implementations - it does not affect an # floating and fixed point arithmetic implementations - it does not affect any
# APIs. The second two (the _POINT settings) switch off individual APIs. # APIs. The second two (the _POINT settings) switch off individual APIs.
# #
# Prior to libpng 1.6.8 one of the API (_POINT) variants had to be selected. At # Prior to libpng 1.6.8 one of the API (_POINT) variants had to be selected. At

View File

@ -1,8 +1,8 @@
/* libpng 1.6.15 STANDARD API DEFINITION */ /* libpng 1.6.16 STANDARD API DEFINITION */
/* pnglibconf.h - library build configuration */ /* pnglibconf.h - library build configuration */
/* Libpng version 1.6.15 - November 20, 2014 */ /* Libpng version 1.6.16 - December 22, 2014 */
/* Copyright (c) 1998-2014 Glenn Randers-Pehrson */ /* Copyright (c) 1998-2014 Glenn Randers-Pehrson */

View File

@ -1,8 +1,8 @@
/* prefix.dfn - generate an unprefixed symbol list /* prefix.c - generate an unprefixed symbol list
* *
* Last changed in libpng version 1.6.0 [January 30, 2012] * Last changed in libpng version 1.6.16 [December 22, 2014]
* Copyright (c) 2012 Glenn Randers-Pehrson * Copyright (c) 2013-2014 Glenn Randers-Pehrson
* *
* This code is released under the libpng license. * This code is released under the libpng license.
* For conditions of distribution and use, see the disclaimer * For conditions of distribution and use, see the disclaimer

View File

@ -1,8 +1,8 @@
/* sym.dfn - define format of libpng.sym /* sym.c - define format of libpng.sym
* *
* Last changed in libpng version 1.5.0 [January 6, 2011] * Last changed in libpng version 1.6.16 [December 22, 2014]
* Copyright (c) 1998-2011 Glenn Randers-Pehrson * Copyright (c) 2011-2014 Glenn Randers-Pehrson
* *
* This code is released under the libpng license. * This code is released under the libpng license.
* For conditions of distribution and use, see the disclaimer * For conditions of distribution and use, see the disclaimer

View File

@ -1,8 +1,8 @@
/* symbols.dfn - find all exported symbols /* symbols.c - find all exported symbols
* *
* Last changed in libpng version 1.5.0 [January 6, 2011] * Last changed in libpng version 1.6.16 [December 22, 2014]
* Copyright (c) 1998-2011 Glenn Randers-Pehrson * Copyright (c) 2011-2014 Glenn Randers-Pehrson
* *
* This code is released under the libpng license. * This code is released under the libpng license.
* For conditions of distribution and use, see the disclaimer * For conditions of distribution and use, see the disclaimer

View File

@ -1,4 +1,4 @@
;Version 1.6.15 ;Version 1.6.16
;-------------------------------------------------------------- ;--------------------------------------------------------------
; LIBPNG symbol list as a Win32 DEF file ; LIBPNG symbol list as a Win32 DEF file
; Contains all the symbols that can be exported from libpng ; Contains all the symbols that can be exported from libpng

View File

@ -1,8 +1,8 @@
/* vers.dfn - define format of libpng.vers /* vers.c - define format of libpng.vers
* *
* Last changed in libpng version 1.5.0 [January 6, 2011] * Last changed in libpng version 1.6.16 [December 22, 2014]
* Copyright (c) 1998-2011 Glenn Randers-Pehrson * Copyright (c) 2011-2014 Glenn Randers-Pehrson
* *
* This code is released under the libpng license. * This code is released under the libpng license.
* For conditions of distribution and use, see the disclaimer * For conditions of distribution and use, see the disclaimer