mirror of
https://git.code.sf.net/p/libpng/code.git
synced 2025-07-10 18:04:09 +02:00
Compare commits
18 Commits
v1.7.0beta
...
v1.7.0beta
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
82dd5d3575 | ||
|
|
a5b6764cea | ||
|
|
56850aba35 | ||
|
|
13f025c29a | ||
|
|
d92b0f23e6 | ||
|
|
eeab1cfefc | ||
|
|
38d22ef928 | ||
|
|
ab1ad88ecc | ||
|
|
caa59e0007 | ||
|
|
310ffb25f8 | ||
|
|
c026b07529 | ||
|
|
6988b31244 | ||
|
|
b23a10f565 | ||
|
|
201e9144a6 | ||
|
|
ba8495bba9 | ||
|
|
3393042627 | ||
|
|
a072dfee8e | ||
|
|
e39e182357 |
39
ANNOUNCE
39
ANNOUNCE
@@ -1,5 +1,5 @@
|
||||
|
||||
Libpng 1.7.0beta42 - November 20, 2014
|
||||
Libpng 1.7.0beta45 - December 28, 2014
|
||||
|
||||
This is not intended to be a public release. It will be replaced
|
||||
within a few weeks by a public version or by another test version.
|
||||
@@ -9,20 +9,20 @@ Files available for download:
|
||||
Source files with LF line endings (for Unix/Linux) and with a
|
||||
"configure" script
|
||||
|
||||
1.7.0beta42.tar.xz (LZMA-compressed, recommended)
|
||||
1.7.0beta42.tar.gz
|
||||
1.7.0beta45.tar.xz (LZMA-compressed, recommended)
|
||||
1.7.0beta45.tar.gz
|
||||
|
||||
Source files with CRLF line endings (for Windows), without the
|
||||
"configure" script
|
||||
|
||||
lp170b42.7z (LZMA-compressed, recommended)
|
||||
lp170b42.zip
|
||||
lp170b45.7z (LZMA-compressed, recommended)
|
||||
lp170b45.zip
|
||||
|
||||
Other information:
|
||||
|
||||
1.7.0beta42-README.txt
|
||||
1.7.0beta42-LICENSE.txt
|
||||
libpng-1.7.0beta42-*.asc (armored detached GPG signatures)
|
||||
1.7.0beta45-README.txt
|
||||
1.7.0beta45-LICENSE.txt
|
||||
libpng-1.7.0beta45-*.asc (armored detached GPG signatures)
|
||||
|
||||
Changes since the last public release (1.6.0):
|
||||
|
||||
@@ -658,6 +658,29 @@ Version 1.7.0beta42 [November 20, 2014]
|
||||
Merged clang no-warning fix from libpng-1.6.13: png_digit was defined
|
||||
but never used in pngerror.c.
|
||||
|
||||
Version 1.7.0beta43 [December 18, 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/*.dfn to work with MinGW/MSYS;
|
||||
renamed scripts/*.dfn to scripts/*.c (Bob Friesenhahn and John Bowler).
|
||||
Quiet a "comparison always true" warning in pngstest.c (John Bowler).
|
||||
|
||||
Version 1.7.0beta44 [December 23, 2014]
|
||||
Restored a test on width that was removed from png.c at libpng-1.6.9
|
||||
(Bug report by Alex Eubanks).
|
||||
Fixed an overflow in png_combine_row with very wide interlaced images.
|
||||
Corrected the width limit calculation in png_check_IHDR().
|
||||
Removed extraneous handling of PNG_SAFE_LIMITS_SUPPORTED from pngconf.h
|
||||
|
||||
Version 1.7.0beta45 [December 28, 2014]
|
||||
Eliminated the PNG_SAFE_LIMITS macro and restored the 1-million-column
|
||||
and 1-million-row default limits in pnglibconf.dfa, that can be reset
|
||||
by the user at build time or run time. This provides a more robust
|
||||
defense against DOS and as-yet undiscovered overflows.
|
||||
Removed user limits from pngfix. Also pass NULL pointers to
|
||||
png_read_row to skip the unnecessary row de-interlace stuff.
|
||||
Added testing of png_set_packing() to pngvalid.c
|
||||
|
||||
Send comments/corrections/commendations to png-mng-implement at lists.sf.net
|
||||
(subscription required; visit
|
||||
https://lists.sourceforge.net/lists/listinfo/png-mng-implement
|
||||
|
||||
23
CHANGES
23
CHANGES
@@ -4947,6 +4947,29 @@ Version 1.7.0beta42 [November 20, 2014]
|
||||
Merged clang no-warning fix from libpng-1.6.13: png_digit was defined
|
||||
but never used in pngerror.c.
|
||||
|
||||
Version 1.7.0beta43 [December 18, 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/*.dfn to work with MinGW/MSYS;
|
||||
renamed scripts/*.dfn to scripts/*.c (Bob Friesenhahn and John Bowler).
|
||||
Quiet a "comparison always true" warning in pngstest.c (John Bowler).
|
||||
|
||||
Version 1.7.0beta44 [December 23, 2014]
|
||||
Restored a test on width that was removed from png.c at libpng-1.6.9
|
||||
(Bug report by Alex Eubanks).
|
||||
Fixed an overflow in png_combine_row with very wide interlaced images.
|
||||
Corrected the width limit calculation in png_check_IHDR().
|
||||
Removed extraneous handling of PNG_SAFE_LIMITS_SUPPORTED from pngconf.h
|
||||
|
||||
Version 1.7.0beta45 [December 28, 2014]
|
||||
Eliminated the PNG_SAFE_LIMITS macro and restored the 1-million-column
|
||||
and 1-million-row default limits in pnglibconf.dfa, that can be reset
|
||||
by the user at build time or run time. This provides a more robust
|
||||
defense against DOS and as-yet undiscovered overflows.
|
||||
Removed user limits from pngfix. Also pass NULL pointers to
|
||||
png_read_row to skip the unnecessary row de-interlace stuff.
|
||||
Added testing of png_set_packing() to pngvalid.c
|
||||
|
||||
Send comments/corrections/commendations to png-mng-implement at lists.sf.net
|
||||
(subscription required; visit
|
||||
https://lists.sourceforge.net/lists/listinfo/png-mng-implement
|
||||
|
||||
@@ -253,7 +253,7 @@ endif(NOT WIN32 OR CYGWIN OR MINGW)
|
||||
# SET UP LINKS
|
||||
if(PNG_SHARED)
|
||||
set_target_properties(${PNG_LIB_NAME} PROPERTIES
|
||||
# VERSION 17.${PNGLIB_RELEASE}.1.7.0beta42
|
||||
# VERSION 17.${PNGLIB_RELEASE}.1.7.0beta45
|
||||
VERSION 17.${PNGLIB_RELEASE}.0
|
||||
SOVERSION 17
|
||||
CLEAN_DIRECT_OUTPUT 1)
|
||||
|
||||
4
LICENSE
4
LICENSE
@@ -10,7 +10,7 @@ this sentence.
|
||||
|
||||
This code is released under the libpng license.
|
||||
|
||||
libpng versions 1.2.6, August 15, 2004, through 1.7.0beta42, November 20, 2014, are
|
||||
libpng versions 1.2.6, August 15, 2004, through 1.7.0beta45, December 28, 2014, are
|
||||
Copyright (c) 2004, 2006-2014 Glenn Randers-Pehrson, and are
|
||||
distributed according to the same disclaimer and license as libpng-1.2.5
|
||||
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
|
||||
glennrp at users.sourceforge.net
|
||||
November 20, 2014
|
||||
December 28, 2014
|
||||
|
||||
19
Makefile.am
19
Makefile.am
@@ -129,7 +129,7 @@ EXTRA_DIST= \
|
||||
$(TESTS) $(XFAIL_TESTS) tests/pngstest \
|
||||
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 \
|
||||
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.
|
||||
DFNCPP = @DFNCPP@
|
||||
|
||||
SUFFIXES = .chk .dfn .out
|
||||
SUFFIXES = .chk .out
|
||||
|
||||
$(PNGLIB_BASENAME).pc: libpng.pc
|
||||
cp libpng.pc $@
|
||||
@@ -239,18 +239,17 @@ if DO_PNG_PREFIX
|
||||
SYMBOL_CFLAGS += -DPNG_PREFIX='@PNG_PREFIX@'
|
||||
endif
|
||||
|
||||
.dfn.out:
|
||||
rm -f $@ $*.c $*.tf[12]
|
||||
.c.out:
|
||||
rm -f $@ $*.tf[12]
|
||||
test -d scripts || mkdir scripts || test -d scripts
|
||||
echo '#include "$<"' >$*.c
|
||||
$(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
|
||||
rm -f $*.c $*.tf1
|
||||
rm -f $*.tf1
|
||||
mv $*.tf2 $@
|
||||
|
||||
# The .dfn file for pnglibconf.h is machine generated
|
||||
pnglibconf.dfn: scripts/pnglibconf.dfa scripts/options.awk pngconf.h pngusr.dfa $(DFA_XTRA)
|
||||
# The .c file for pnglibconf.h is machine generated
|
||||
pnglibconf.c: scripts/pnglibconf.dfa scripts/options.awk pngconf.h pngusr.dfa $(DFA_XTRA)
|
||||
rm -f $@ $*.tf[45]
|
||||
$(AWK) -f ${srcdir}/scripts/options.awk out=$*.tf4 version=search\
|
||||
${srcdir}/pngconf.h ${srcdir}/scripts/pnglibconf.dfa\
|
||||
@@ -270,7 +269,7 @@ scripts/symbols.chk: scripts/checksym.awk scripts/symbols.def scripts/symbols.ou
|
||||
|
||||
# used on demand to regenerate the standard header, CPPFLAGS should
|
||||
# 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]
|
||||
test -z "$(CPPFLAGS)"
|
||||
echo "com @PNGLIB_VERSION@ STANDARD API DEFINITION" |\
|
||||
|
||||
2
README
2
README
@@ -1,4 +1,4 @@
|
||||
README for libpng version 1.7.0beta42 - November 20, 2014 (shared library 17.0)
|
||||
README for libpng version 1.7.0beta45 - December 28, 2014 (shared library 17.0)
|
||||
See the note about version numbers near the top of png.h
|
||||
|
||||
See INSTALL for instructions on how to install libpng.
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
*
|
||||
* Copyright (c) 2014 Glenn Randers-Pehrson
|
||||
* Written by Mans Rullgard, 2011.
|
||||
* Last changed in libpng 1.6.10 [March 6, 2014]
|
||||
* Last changed in libpng 1.6.16 [(PENDING RELEASE)]
|
||||
*
|
||||
* This code is released under the libpng license.
|
||||
* For conditions of distribution and use, see the disclaimer
|
||||
@@ -17,6 +17,7 @@
|
||||
#include "../pngpriv.h"
|
||||
|
||||
#ifdef PNG_READ_SUPPORTED
|
||||
|
||||
#if PNG_ARM_NEON_OPT > 0
|
||||
#ifdef PNG_ARM_NEON_CHECK_SUPPORTED /* Do run-time checks */
|
||||
/* 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_READ_SUPPORTED */
|
||||
#endif /* READ */
|
||||
|
||||
@@ -1,18 +1,17 @@
|
||||
|
||||
/* filter_neon.S - NEON optimised filter functions
|
||||
*
|
||||
* Copyright (c) 2013 Glenn Randers-Pehrson
|
||||
* Copyright (c) 2014 Glenn Randers-Pehrson
|
||||
* Written by Mans Rullgard, 2011.
|
||||
* Last changed in libpng 1.6.8 [December 19, 2013]
|
||||
* Last changed in libpng 1.6.16 [(PENDING RELEASE)]
|
||||
*
|
||||
* This code is released under the libpng license.
|
||||
* For conditions of distribution and use, see the disclaimer
|
||||
* and license in png.h
|
||||
*/
|
||||
|
||||
/* This is required to get the symbol renames, which are #defines, and also
|
||||
* includes the definition (or not) of PNG_ARM_NEON_OPT and
|
||||
* PNG_ARM_NEON_IMPLEMENTATION.
|
||||
/* This is required to get the symbol renames, which are #defines, and the
|
||||
* definitions (or not) of PNG_ARM_NEON_OPT and PNG_ARM_NEON_IMPLEMENTATION.
|
||||
*/
|
||||
#define PNG_VERSION_INFO_ONLY
|
||||
#include "../pngpriv.h"
|
||||
@@ -21,6 +20,8 @@
|
||||
.section .note.GNU-stack,"",%progbits /* mark stack as non-executable */
|
||||
#endif
|
||||
|
||||
#ifdef PNG_READ_SUPPORTED
|
||||
|
||||
/* 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
|
||||
* 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 */
|
||||
|
||||
#ifdef PNG_READ_SUPPORTED
|
||||
#if PNG_ARM_NEON_OPT > 0
|
||||
|
||||
#ifdef __ELF__
|
||||
@@ -47,6 +47,13 @@ ELF .size \name, . - \name
|
||||
.purgem endfunc
|
||||
.endm
|
||||
.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
|
||||
.global \name
|
||||
.endif
|
||||
@@ -242,5 +249,5 @@ func png_read_filter_row_paeth3_neon, export=1
|
||||
pop {r4,pc}
|
||||
endfunc
|
||||
#endif /* PNG_ARM_NEON_OPT > 0 */
|
||||
#endif /* PNG_READ_SUPPORTED */
|
||||
#endif /* PNG_ARM_NEON_IMPLEMENTATION == 2 (assembler) */
|
||||
#endif /* READ */
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
|
||||
/* 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.
|
||||
* 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 [(PENDING RELEASE)]
|
||||
*
|
||||
* This code is released under the libpng license.
|
||||
* For conditions of distribution and use, see the disclaimer
|
||||
@@ -14,6 +14,8 @@
|
||||
|
||||
#include "../pngpriv.h"
|
||||
|
||||
#ifdef PNG_READ_SUPPORTED
|
||||
|
||||
/* This code requires -mfpu=neon on the command line: */
|
||||
#if PNG_ARM_NEON_IMPLEMENTATION == 1 /* intrinsics code from pngpriv.h */
|
||||
|
||||
@@ -35,7 +37,6 @@
|
||||
#define png_ldr(type,pointer)\
|
||||
(temp_pointer = png_ptr(type,pointer), *temp_pointer)
|
||||
|
||||
#ifdef PNG_READ_SUPPORTED
|
||||
#if PNG_ARM_NEON_OPT > 0
|
||||
|
||||
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_READ_SUPPORTED */
|
||||
#endif /* PNG_ARM_NEON_IMPLEMENTATION == 1 (intrinsics) */
|
||||
#endif /* READ */
|
||||
|
||||
@@ -18,7 +18,7 @@ AC_PREREQ([2.68])
|
||||
|
||||
dnl Version number stuff here:
|
||||
|
||||
AC_INIT([libpng],[1.7.0beta42],[png-mng-implement@lists.sourceforge.net])
|
||||
AC_INIT([libpng],[1.7.0beta45],[png-mng-implement@lists.sourceforge.net])
|
||||
AC_CONFIG_MACRO_DIR([scripts])
|
||||
|
||||
# libpng does not follow GNU file name conventions (hence 'foreign')
|
||||
@@ -39,7 +39,7 @@ 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.7.0beta42
|
||||
PNGLIB_VERSION=1.7.0beta45
|
||||
PNGLIB_MAJOR=1
|
||||
PNGLIB_MINOR=7
|
||||
PNGLIB_RELEASE=0
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
*
|
||||
* Copyright (c) 2014 Glenn Randers-Pehrson
|
||||
* Written by John Bowler, 2014.
|
||||
* Last changed in libpng 1.6.10 [March 6, 2014]
|
||||
* Last changed in libpng 1.6.16 [(PENDING RELEASE)]
|
||||
*
|
||||
* This code is released under the libpng license.
|
||||
* For conditions of distribution and use, see the disclaimer
|
||||
@@ -16,8 +16,8 @@
|
||||
* png_have_neon implemented for Linux by reading the widely available
|
||||
* pseudo-file /proc/cpuinfo.
|
||||
*
|
||||
* 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.
|
||||
* This code is strict ANSI-C and is probably moderately portable; it does
|
||||
* however use <stdio.h> and it assumes that /proc/cpuinfo is never localized.
|
||||
*/
|
||||
#include <stdio.h>
|
||||
|
||||
@@ -152,8 +152,10 @@ png_have_neon(png_structp png_ptr)
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef PNG_WARNINGS_SUPPORTED
|
||||
else
|
||||
png_warning(png_ptr, "/proc/cpuinfo open failed");
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
/*-
|
||||
* 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 [(PENDING RELEASE)]
|
||||
*
|
||||
* This code is released under the libpng license.
|
||||
* For conditions of distribution and use, see the disclaimer
|
||||
@@ -3173,32 +3173,43 @@ read_one_file(Image *image)
|
||||
{
|
||||
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 (b != NULL)
|
||||
if ((unsigned long int)cb <= (size_t)~(size_t)0)
|
||||
{
|
||||
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);
|
||||
image->input_memory_size = cb;
|
||||
image->input_memory = b;
|
||||
rewind(f);
|
||||
|
||||
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
|
||||
{
|
||||
free(b);
|
||||
return logclose(image, f, image->file_name,
|
||||
": read failed: ");
|
||||
}
|
||||
": out of memory: ");
|
||||
}
|
||||
|
||||
else
|
||||
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)
|
||||
|
||||
@@ -5560,6 +5560,7 @@ typedef struct transform_display
|
||||
/* Local variables */
|
||||
png_byte output_colour_type;
|
||||
png_byte output_bit_depth;
|
||||
png_byte unpacked;
|
||||
|
||||
/* Modifications (not necessarily used.) */
|
||||
gama_modification gama_mod;
|
||||
@@ -5724,6 +5725,7 @@ transform_display_init(transform_display *dp, png_modifier *pm, png_uint_32 id,
|
||||
/* Local variable fields */
|
||||
dp->output_colour_type = 255; /* invalid */
|
||||
dp->output_bit_depth = 255; /* invalid */
|
||||
dp->unpacked = 0; /* not unpacked */
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -5785,7 +5787,8 @@ transform_info_imp(transform_display *dp, png_structp pp, png_infop pi)
|
||||
}
|
||||
|
||||
/* Use a test pixel to check that the output agrees with what we expect -
|
||||
* this avoids running the whole test if the output is unexpected.
|
||||
* this avoids running the whole test if the output is unexpected. This also
|
||||
* checks for internal errors.
|
||||
*/
|
||||
{
|
||||
image_pixel test_pixel;
|
||||
@@ -5831,22 +5834,41 @@ transform_info_imp(transform_display *dp, png_structp pp, png_infop pi)
|
||||
}
|
||||
|
||||
/* If both bit depth and colour type are correct check the sample depth.
|
||||
* I believe these are both internal errors.
|
||||
*/
|
||||
if (test_pixel.colour_type == PNG_COLOR_TYPE_PALETTE)
|
||||
{
|
||||
if (test_pixel.sample_depth != 8) /* oops - internal error! */
|
||||
png_error(pp, "pngvalid: internal: palette sample depth not 8");
|
||||
}
|
||||
else if (test_pixel.sample_depth != dp->output_bit_depth)
|
||||
if (test_pixel.colour_type == PNG_COLOR_TYPE_PALETTE &&
|
||||
test_pixel.sample_depth != 8) /* oops - internal error! */
|
||||
png_error(pp, "pngvalid: internal: palette sample depth not 8");
|
||||
else if (dp->unpacked && test_pixel.bit_depth != 8)
|
||||
png_error(pp, "pngvalid: internal: bad unpacked pixel depth");
|
||||
else if (!dp->unpacked && test_pixel.colour_type != PNG_COLOR_TYPE_PALETTE
|
||||
&& test_pixel.bit_depth != test_pixel.sample_depth)
|
||||
{
|
||||
char message[128];
|
||||
size_t pos = safecat(message, sizeof message, 0,
|
||||
"internal: sample depth ");
|
||||
|
||||
/* Because unless something has set 'unpacked' or the image is palette
|
||||
* mapped we expect the transform to keep sample depth and bit depth
|
||||
* the same.
|
||||
*/
|
||||
pos = safecatn(message, sizeof message, pos, test_pixel.sample_depth);
|
||||
pos = safecat(message, sizeof message, pos, " expected ");
|
||||
pos = safecatn(message, sizeof message, pos, test_pixel.bit_depth);
|
||||
|
||||
png_error(pp, message);
|
||||
}
|
||||
else if (test_pixel.bit_depth != dp->output_bit_depth)
|
||||
{
|
||||
/* This could be a libpng error too; libpng has not produced what we
|
||||
* expect for the output bit depth.
|
||||
*/
|
||||
char message[128];
|
||||
size_t pos = safecat(message, sizeof message, 0,
|
||||
"internal: bit depth ");
|
||||
|
||||
pos = safecatn(message, sizeof message, pos, dp->output_bit_depth);
|
||||
pos = safecat(message, sizeof message, pos, " expected ");
|
||||
pos = safecatn(message, sizeof message, pos, test_pixel.sample_depth);
|
||||
pos = safecatn(message, sizeof message, pos, test_pixel.bit_depth);
|
||||
|
||||
png_error(pp, message);
|
||||
}
|
||||
@@ -7405,6 +7427,130 @@ IT(background);
|
||||
#define PT ITSTRUCT(background)
|
||||
#endif /* PNG_READ_BACKGROUND_SUPPORTED */
|
||||
|
||||
/* png_set_quantize(png_structp, png_colorp palette, int num_palette,
|
||||
* int maximum_colors, png_const_uint_16p histogram, int full_quantize)
|
||||
*
|
||||
* Very difficult to validate this!
|
||||
*/
|
||||
/*NOTE: TBD NYI */
|
||||
|
||||
/* The data layout transforms are handled by swapping our own channel data,
|
||||
* necessarily these need to happen at the end of the transform list because the
|
||||
* semantic of the channels changes after these are executed. Some of these,
|
||||
* like set_shift and set_packing, can't be done at present because they change
|
||||
* the layout of the data at the sub-sample level so sample() won't get the
|
||||
* right answer.
|
||||
*/
|
||||
/* png_set_invert_alpha */
|
||||
/*NOTE: TBD NYI */
|
||||
|
||||
/* png_set_bgr */
|
||||
/*NOTE: TBD NYI */
|
||||
|
||||
/* png_set_swap_alpha */
|
||||
/*NOTE: TBD NYI */
|
||||
|
||||
/* png_set_swap */
|
||||
/*NOTE: TBD NYI */
|
||||
|
||||
/* png_set_filler, (png_structp png_ptr, png_uint_32 filler, int flags)); */
|
||||
/*NOTE: TBD NYI */
|
||||
|
||||
/* png_set_add_alpha, (png_structp png_ptr, png_uint_32 filler, int flags)); */
|
||||
/*NOTE: TBD NYI */
|
||||
|
||||
/* png_set_packing */
|
||||
#ifdef PNG_READ_PACK_SUPPORTED
|
||||
/* Use 1 byte per pixel in 1, 2, or 4-bit depth files.
|
||||
*
|
||||
* png_set_packing(png_structrp png_ptr)
|
||||
*
|
||||
* This should only affect grayscale and palette images with less than 8 bits
|
||||
* per pixel.
|
||||
*/
|
||||
static void
|
||||
image_transform_png_set_packing_set(PNG_CONST image_transform *this,
|
||||
transform_display *that, png_structp pp, png_infop pi)
|
||||
{
|
||||
png_set_packing(pp);
|
||||
that->unpacked = 1;
|
||||
this->next->set(this->next, that, pp, pi);
|
||||
}
|
||||
|
||||
static void
|
||||
image_transform_png_set_packing_mod(PNG_CONST image_transform *this,
|
||||
image_pixel *that, png_const_structp pp,
|
||||
PNG_CONST transform_display *display)
|
||||
{
|
||||
/* The general expand case depends on what the colour type is,
|
||||
* low bit-depth pixel values are unpacked into bytes without
|
||||
* scaling, so sample_depth is not changed.
|
||||
*/
|
||||
if (that->bit_depth < 8) /* grayscale or palette */
|
||||
that->bit_depth = 8;
|
||||
|
||||
this->next->mod(this->next, that, pp, display);
|
||||
}
|
||||
|
||||
static int
|
||||
image_transform_png_set_packing_add(image_transform *this,
|
||||
PNG_CONST image_transform **that, png_byte colour_type, png_byte bit_depth)
|
||||
{
|
||||
UNUSED(colour_type)
|
||||
|
||||
this->next = *that;
|
||||
*that = this;
|
||||
|
||||
/* Nothing should happen unless the bit depth is less than 8: */
|
||||
return bit_depth < 8;
|
||||
}
|
||||
|
||||
IT(packing);
|
||||
#undef PT
|
||||
#define PT ITSTRUCT(packing)
|
||||
|
||||
#endif /* PNG_READ_PACK_SUPPORTED */
|
||||
|
||||
/* png_set_packswap */
|
||||
/*NOTE: TBD NYI */
|
||||
|
||||
/* png_set_invert_mono */
|
||||
/*NOTE: TBD NYI */
|
||||
|
||||
/* png_set_shift(png_structp, png_const_color_8p true_bits) */
|
||||
/*NOTE: TBD NYI */
|
||||
|
||||
#ifdef THIS_IS_THE_PROFORMA
|
||||
static void
|
||||
image_transform_png_set_@_set(PNG_CONST image_transform *this,
|
||||
transform_display *that, png_structp pp, png_infop pi)
|
||||
{
|
||||
png_set_@(pp);
|
||||
this->next->set(this->next, that, pp, pi);
|
||||
}
|
||||
|
||||
static void
|
||||
image_transform_png_set_@_mod(PNG_CONST image_transform *this,
|
||||
image_pixel *that, png_const_structp pp,
|
||||
PNG_CONST transform_display *display)
|
||||
{
|
||||
this->next->mod(this->next, that, pp, display);
|
||||
}
|
||||
|
||||
static int
|
||||
image_transform_png_set_@_add(image_transform *this,
|
||||
PNG_CONST image_transform **that, png_byte colour_type, png_byte bit_depth)
|
||||
{
|
||||
this->next = *that;
|
||||
*that = this;
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
IT(@);
|
||||
#endif
|
||||
|
||||
|
||||
/* This may just be 'end' if all the transforms are disabled! */
|
||||
static image_transform *PNG_CONST image_transform_first = &PT;
|
||||
|
||||
@@ -7582,83 +7728,6 @@ image_transform_add(PNG_CONST image_transform **this, unsigned int max,
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef THIS_IS_THE_PROFORMA
|
||||
static void
|
||||
image_transform_png_set_@_set(PNG_CONST image_transform *this,
|
||||
transform_display *that, png_structp pp, png_infop pi)
|
||||
{
|
||||
png_set_@(pp);
|
||||
this->next->set(this->next, that, pp, pi);
|
||||
}
|
||||
|
||||
static void
|
||||
image_transform_png_set_@_mod(PNG_CONST image_transform *this,
|
||||
image_pixel *that, png_const_structp pp,
|
||||
PNG_CONST transform_display *display)
|
||||
{
|
||||
this->next->mod(this->next, that, pp, display);
|
||||
}
|
||||
|
||||
static int
|
||||
image_transform_png_set_@_add(image_transform *this,
|
||||
PNG_CONST image_transform **that, char *name, size_t sizeof_name,
|
||||
size_t *pos, png_byte colour_type, png_byte bit_depth)
|
||||
{
|
||||
this->next = *that;
|
||||
*that = this;
|
||||
|
||||
*pos = safecat(name, sizeof_name, *pos, " +@");
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
IT(@);
|
||||
#endif
|
||||
|
||||
/* png_set_quantize(png_structp, png_colorp palette, int num_palette,
|
||||
* int maximum_colors, png_const_uint_16p histogram, int full_quantize)
|
||||
*
|
||||
* Very difficult to validate this!
|
||||
*/
|
||||
/*NOTE: TBD NYI */
|
||||
|
||||
/* The data layout transforms are handled by swapping our own channel data,
|
||||
* necessarily these need to happen at the end of the transform list because the
|
||||
* semantic of the channels changes after these are executed. Some of these,
|
||||
* like set_shift and set_packing, can't be done at present because they change
|
||||
* the layout of the data at the sub-sample level so sample() won't get the
|
||||
* right answer.
|
||||
*/
|
||||
/* png_set_invert_alpha */
|
||||
/*NOTE: TBD NYI */
|
||||
|
||||
/* png_set_bgr */
|
||||
/*NOTE: TBD NYI */
|
||||
|
||||
/* png_set_swap_alpha */
|
||||
/*NOTE: TBD NYI */
|
||||
|
||||
/* png_set_swap */
|
||||
/*NOTE: TBD NYI */
|
||||
|
||||
/* png_set_filler, (png_structp png_ptr, png_uint_32 filler, int flags)); */
|
||||
/*NOTE: TBD NYI */
|
||||
|
||||
/* png_set_add_alpha, (png_structp png_ptr, png_uint_32 filler, int flags)); */
|
||||
/*NOTE: TBD NYI */
|
||||
|
||||
/* png_set_packing */
|
||||
/*NOTE: TBD NYI */
|
||||
|
||||
/* png_set_packswap */
|
||||
/*NOTE: TBD NYI */
|
||||
|
||||
/* png_set_invert_mono */
|
||||
/*NOTE: TBD NYI */
|
||||
|
||||
/* png_set_shift(png_structp, png_const_color_8p true_bits) */
|
||||
/*NOTE: TBD NYI */
|
||||
|
||||
static void
|
||||
perform_transform_test(png_modifier *pm)
|
||||
{
|
||||
|
||||
@@ -2,14 +2,14 @@
|
||||
*
|
||||
* Copyright (c) 2014 John Cunningham Bowler
|
||||
*
|
||||
* Last changed in libpng 1.6.14 [(PENDING RELEASE)]
|
||||
* Last changed in libpng 1.6.17 [(PENDING RELEASE)]
|
||||
*
|
||||
* This code is released under the libpng license.
|
||||
* For conditions of distribution and use, see the disclaimer
|
||||
* and license in png.h
|
||||
*
|
||||
* Tool to check and fix the zlib inflate 'too far back' problem, see the usage
|
||||
* message for more information.
|
||||
* Tool to check and fix the zlib inflate 'too far back' problem.
|
||||
* See the usage message for more information.
|
||||
*/
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
@@ -3577,7 +3577,6 @@ read_png(struct control *control)
|
||||
{
|
||||
png_structp png_ptr;
|
||||
png_infop info_ptr = NULL;
|
||||
volatile png_bytep row = NULL, display = NULL;
|
||||
volatile int rc;
|
||||
|
||||
png_ptr = png_create_read_struct(PNG_LIBPNG_VER_STRING, control,
|
||||
@@ -3594,6 +3593,16 @@ read_png(struct control *control)
|
||||
rc = setjmp(control->file.jmpbuf);
|
||||
if (rc == 0)
|
||||
{
|
||||
# ifdef PNG_SET_USER_LIMITS_SUPPORTED
|
||||
/* Remove any limits on the size of PNG files that can be read,
|
||||
* without this we may reject files based on built-in safety
|
||||
* limits.
|
||||
*/
|
||||
png_set_user_limits(png_ptr, 0x7fffffff, 0x7fffffff);
|
||||
png_set_chunk_cache_max(png_ptr, 0);
|
||||
png_set_chunk_malloc_max(png_ptr, 0);
|
||||
# endif
|
||||
|
||||
png_set_read_fn(png_ptr, control, read_callback);
|
||||
|
||||
info_ptr = png_create_info_struct(png_ptr);
|
||||
@@ -3606,32 +3615,22 @@ read_png(struct control *control)
|
||||
png_read_info(png_ptr, info_ptr);
|
||||
|
||||
{
|
||||
png_size_t rowbytes = png_get_rowbytes(png_ptr, info_ptr);
|
||||
png_uint_32 height = png_get_image_height(png_ptr, info_ptr);
|
||||
int passes = png_set_interlace_handling(png_ptr);
|
||||
int pass;
|
||||
|
||||
row = png_voidcast(png_byte*, malloc(rowbytes));
|
||||
display = png_voidcast(png_byte*, malloc(rowbytes));
|
||||
png_start_read_image(png_ptr);
|
||||
|
||||
if (row == NULL || display == NULL)
|
||||
png_error(png_ptr, "OOM allocating row buffers");
|
||||
for (pass = 0; pass < passes; ++pass)
|
||||
{
|
||||
png_uint_32 y = height;
|
||||
|
||||
{
|
||||
png_uint_32 height = png_get_image_height(png_ptr, info_ptr);
|
||||
int passes = png_set_interlace_handling(png_ptr);
|
||||
int pass;
|
||||
|
||||
png_start_read_image(png_ptr);
|
||||
|
||||
for (pass = 0; pass < passes; ++pass)
|
||||
{
|
||||
png_uint_32 y = height;
|
||||
|
||||
/* NOTE: this trashes the row each time; interlace handling won't
|
||||
* work, but this avoids memory thrashing for speed testing.
|
||||
*/
|
||||
while (y-- > 0)
|
||||
png_read_row(png_ptr, row, display);
|
||||
}
|
||||
}
|
||||
/* NOTE: this skips asking libpng to return either version of
|
||||
* the image row, but libpng still reads the rows.
|
||||
*/
|
||||
while (y-- > 0)
|
||||
png_read_row(png_ptr, NULL, NULL);
|
||||
}
|
||||
}
|
||||
|
||||
if (control->file.global->verbose)
|
||||
@@ -3642,8 +3641,6 @@ read_png(struct control *control)
|
||||
}
|
||||
|
||||
png_destroy_read_struct(&png_ptr, &info_ptr, NULL);
|
||||
if (row != NULL) free(row);
|
||||
if (display != NULL) free(display);
|
||||
return rc;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
libpng-manual.txt - A description on how to use and modify libpng
|
||||
|
||||
libpng version 1.7.0beta42 - November 20, 2014
|
||||
libpng version 1.7.0beta45 - December 28, 2014
|
||||
Updated and distributed by Glenn Randers-Pehrson
|
||||
<glennrp at users.sourceforge.net>
|
||||
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:
|
||||
|
||||
libpng versions 0.97, January 1998, through 1.7.0beta42 - November 20, 2014
|
||||
libpng versions 0.97, January 1998, through 1.7.0beta45 - December 28, 2014
|
||||
Updated and distributed by Glenn Randers-Pehrson
|
||||
Copyright (c) 1998-2014 Glenn Randers-Pehrson
|
||||
|
||||
@@ -648,7 +648,7 @@ User limits
|
||||
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.
|
||||
Since very few applications really need to process such large images,
|
||||
we have imposed an arbitrary 1-million limit on rows and columns.
|
||||
we have imposed an arbitrary 1,000,000 limit on rows and columns.
|
||||
Larger images will be rejected immediately with a png_error() call. If
|
||||
you wish to change this limit, you can use
|
||||
|
||||
@@ -5106,6 +5106,17 @@ length, which resulted in PNG files that cannot be read beyond the bad iTXt
|
||||
chunk. This error was fixed in libpng-1.6.3, and a tool (called
|
||||
contrib/tools/png-fix-itxt) has been added to the libpng distribution.
|
||||
|
||||
Starting with libpng-1.6.17, the PNG_SAFE_LIMITS macro was eliminated
|
||||
and safe limits are used by default (users who need larger limits
|
||||
can still override them at compile time or run time, as described above).
|
||||
|
||||
The new limits are
|
||||
default spec limit
|
||||
png_user_width_max 1,000,000 2,147,483,647
|
||||
png_user_height_max 1,000,000 2,147,483,647
|
||||
png_user_chunk_cache_max 128 unlimited
|
||||
png_user_chunk_malloc_max 8,000,000 unlimited
|
||||
|
||||
XIII. Changes to Libpng from version 1.6.x to 1.7.x
|
||||
|
||||
Some functions that were deprecated in libpng-1.6.0 were removed:
|
||||
@@ -5309,13 +5320,13 @@ Other rules can be inferred by inspecting the libpng source.
|
||||
|
||||
XVII. Y2K Compliance in libpng
|
||||
|
||||
November 20, 2014
|
||||
December 28, 2014
|
||||
|
||||
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.7.0beta42 are Y2K compliant. It is my belief that earlier
|
||||
upward through 1.7.0beta45 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
|
||||
|
||||
33
libpng.3
33
libpng.3
@@ -1,6 +1,6 @@
|
||||
.TH LIBPNG 3 "November 20, 2014"
|
||||
.TH LIBPNG 3 "December 28, 2014"
|
||||
.SH NAME
|
||||
libpng \- Portable Network Graphics (PNG) Reference Library 1.7.0beta42
|
||||
libpng \- Portable Network Graphics (PNG) Reference Library 1.7.0beta45
|
||||
.SH SYNOPSIS
|
||||
\fB
|
||||
#include <png.h>\fP
|
||||
@@ -494,7 +494,7 @@ 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.7.0beta42 - November 20, 2014
|
||||
libpng version 1.7.0beta45 - December 28, 2014
|
||||
Updated and distributed by Glenn Randers-Pehrson
|
||||
<glennrp at users.sourceforge.net>
|
||||
Copyright (c) 1998-2014 Glenn Randers-Pehrson
|
||||
@@ -505,7 +505,7 @@ libpng-manual.txt - A description on how to use and modify libpng
|
||||
|
||||
Based on:
|
||||
|
||||
libpng versions 0.97, January 1998, through 1.7.0beta42 - November 20, 2014
|
||||
libpng versions 0.97, January 1998, through 1.7.0beta45 - December 28, 2014
|
||||
Updated and distributed by Glenn Randers-Pehrson
|
||||
Copyright (c) 1998-2014 Glenn Randers-Pehrson
|
||||
|
||||
@@ -1142,7 +1142,7 @@ callback function:
|
||||
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.
|
||||
Since very few applications really need to process such large images,
|
||||
we have imposed an arbitrary 1-million limit on rows and columns.
|
||||
we have imposed an arbitrary 1,000,000 limit on rows and columns.
|
||||
Larger images will be rejected immediately with a png_error() call. If
|
||||
you wish to change this limit, you can use
|
||||
|
||||
@@ -5600,6 +5600,17 @@ length, which resulted in PNG files that cannot be read beyond the bad iTXt
|
||||
chunk. This error was fixed in libpng-1.6.3, and a tool (called
|
||||
contrib/tools/png-fix-itxt) has been added to the libpng distribution.
|
||||
|
||||
Starting with libpng-1.6.17, the PNG_SAFE_LIMITS macro was eliminated
|
||||
and safe limits are used by default (users who need larger limits
|
||||
can still override them at compile time or run time, as described above).
|
||||
|
||||
The new limits are
|
||||
default spec limit
|
||||
png_user_width_max 1,000,000 2,147,483,647
|
||||
png_user_height_max 1,000,000 2,147,483,647
|
||||
png_user_chunk_cache_max 128 unlimited
|
||||
png_user_chunk_malloc_max 8,000,000 unlimited
|
||||
|
||||
.SH XIII. Changes to Libpng from version 1.6.x to 1.7.x
|
||||
|
||||
Some functions that were deprecated in libpng-1.6.0 were removed:
|
||||
@@ -5803,13 +5814,13 @@ Other rules can be inferred by inspecting the libpng source.
|
||||
|
||||
.SH XVII. Y2K Compliance in libpng
|
||||
|
||||
November 20, 2014
|
||||
December 28, 2014
|
||||
|
||||
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.7.0beta42 are Y2K compliant. It is my belief that earlier
|
||||
upward through 1.7.0beta45 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
|
||||
@@ -6016,7 +6027,7 @@ the first widely used release:
|
||||
1.5.7 15 10507 15.so.15.7[.0]
|
||||
1.6.0beta01-37 16 10600 16.so.16.0[.0]
|
||||
1.7.0alpha01-10 17 10700 17.so.17.0[.0]
|
||||
1.7.0beta01-41 17 10700 17.so.17.0[.0]
|
||||
1.7.0beta01-45 17 10700 17.so.17.0[.0]
|
||||
|
||||
Henceforth the source version will match the shared-library minor
|
||||
and patch numbers; the shared-library major version number will be
|
||||
@@ -6073,7 +6084,7 @@ possible without all of you.
|
||||
|
||||
Thanks to Frank J. T. Wojcik for helping with the documentation.
|
||||
|
||||
Libpng version 1.7.0beta42 - November 20, 2014:
|
||||
Libpng version 1.7.0beta45 - December 28, 2014:
|
||||
Initially created in 1995 by Guy Eric Schalnat, then of Group 42, Inc.
|
||||
Currently maintained by Glenn Randers-Pehrson (glennrp at users.sourceforge.net).
|
||||
|
||||
@@ -6096,7 +6107,7 @@ this sentence.
|
||||
|
||||
This code is released under the libpng license.
|
||||
|
||||
libpng versions 1.2.6, August 15, 2004, through 1.7.0beta42, November 20, 2014, are
|
||||
libpng versions 1.2.6, August 15, 2004, through 1.7.0beta45, December 28, 2014, are
|
||||
Copyright (c) 2004,2006-2007 Glenn Randers-Pehrson, and are
|
||||
distributed according to the same disclaimer and license as libpng-1.2.5
|
||||
with the following individual added to the list of Contributing Authors
|
||||
@@ -6195,7 +6206,7 @@ certification mark of the Open Source Initiative.
|
||||
|
||||
Glenn Randers-Pehrson
|
||||
glennrp at users.sourceforge.net
|
||||
November 20, 2014
|
||||
December 28, 2014
|
||||
|
||||
.\" end of man page
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
.TH LIBPNGPF 3 "November 20, 2014"
|
||||
.TH LIBPNGPF 3 "December 28, 2014"
|
||||
.SH NAME
|
||||
libpng \- Portable Network Graphics (PNG) Reference Library 1.7.0beta42
|
||||
libpng \- Portable Network Graphics (PNG) Reference Library 1.7.0beta45
|
||||
(private functions)
|
||||
.SH SYNOPSIS
|
||||
\fB#include \fI"pngpriv.h"
|
||||
|
||||
2
png.5
2
png.5
@@ -1,4 +1,4 @@
|
||||
.TH PNG 5 "November 20, 2014"
|
||||
.TH PNG 5 "December 28, 2014"
|
||||
.SH NAME
|
||||
png \- Portable Network Graphics (PNG) format
|
||||
.SH DESCRIPTION
|
||||
|
||||
44
png.c
44
png.c
@@ -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_7_0beta42 Your_png_h_is_not_version_1_7_0beta42;
|
||||
typedef png_libpng_version_1_7_0beta45 Your_png_h_is_not_version_1_7_0beta45;
|
||||
|
||||
/* 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
|
||||
@@ -691,13 +691,13 @@ png_get_copyright(png_const_structrp png_ptr)
|
||||
#else
|
||||
# ifdef __STDC__
|
||||
return PNG_STRING_NEWLINE \
|
||||
"libpng version 1.7.0beta42 - November 20, 2014" PNG_STRING_NEWLINE \
|
||||
"libpng version 1.7.0beta45 - December 28, 2014" PNG_STRING_NEWLINE \
|
||||
"Copyright (c) 1998-2014 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.7.0beta42 - November 20, 2014\
|
||||
return "libpng version 1.7.0beta45 - December 28, 2014\
|
||||
Copyright (c) 1998-2014 Glenn Randers-Pehrson\
|
||||
Copyright (c) 1996-1997 Andreas Dilger\
|
||||
Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc.";
|
||||
@@ -982,7 +982,7 @@ png_colorspace_set_gamma(png_const_structrp png_ptr,
|
||||
png_colorspacerp colorspace, png_fixed_point gAMA)
|
||||
{
|
||||
/* 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
|
||||
* 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
|
||||
@@ -1231,7 +1231,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
|
||||
* 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
|
||||
@@ -1723,7 +1723,7 @@ png_icc_profile_error(png_const_structrp png_ptr, png_colorspacerp colorspace,
|
||||
PNG_UNUSED(pos)
|
||||
|
||||
/* 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
|
||||
* application errors the PNG won't be written.)
|
||||
*/
|
||||
@@ -2357,6 +2357,17 @@ png_colorspace_set_rgb_coefficients(png_structrp png_ptr)
|
||||
|
||||
#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 */
|
||||
png_check_IHDR(png_const_structrp png_ptr,
|
||||
png_uint_32 width, png_uint_32 height, int bit_depth,
|
||||
@@ -2376,6 +2387,27 @@ png_check_IHDR(png_const_structrp png_ptr,
|
||||
png_warning(png_ptr, "Invalid image width in IHDR");
|
||||
error = 1;
|
||||
}
|
||||
else if (png_gt(((width + 7) & (~7)),
|
||||
((PNG_SIZE_MAX
|
||||
- 48 /* big_row_buf hack */
|
||||
- 1) /* filter byte */
|
||||
/ 8) /* 8-byte RGBA pixels */
|
||||
- 1)) /* 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
|
||||
{
|
||||
# ifdef PNG_SET_USER_LIMITS_SUPPORTED
|
||||
|
||||
20
png.h
20
png.h
@@ -1,7 +1,7 @@
|
||||
|
||||
/* png.h - header file for PNG reference library
|
||||
*
|
||||
* libpng version 1.7.0beta42 - November 20, 2014
|
||||
* libpng version 1.7.0beta45 - December 28, 2014
|
||||
* Copyright (c) 1998-2013 Glenn Randers-Pehrson
|
||||
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
||||
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
|
||||
@@ -11,7 +11,7 @@
|
||||
* Authors and maintainers:
|
||||
* 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.97, January 1998, through 1.7.0beta42 - November 20, 2014: Glenn
|
||||
* libpng versions 0.97, January 1998, through 1.7.0beta45 - December 28, 2014: Glenn
|
||||
* See also "Contributing Authors", below.
|
||||
*
|
||||
* Note about libpng version numbers:
|
||||
@@ -168,7 +168,7 @@
|
||||
* 1.5.7 15 10507 15.so.15.7[.0]
|
||||
* 1.6.0beta01-37 16 10600 16.so.16.0[.0]
|
||||
* 1.7.0alpha01-10 17 10700 17.so.17.0[.0]
|
||||
* 1.7.0beta01-41 17 10700 17.so.17.0[.0]
|
||||
* 1.7.0beta01-45 17 10700 17.so.17.0[.0]
|
||||
*
|
||||
* Henceforth the source version will match the shared-library major
|
||||
* and minor numbers; the shared-library major version number will be
|
||||
@@ -200,7 +200,7 @@
|
||||
*
|
||||
* This code is released under the libpng license.
|
||||
*
|
||||
* libpng versions 1.2.6, August 15, 2004, through 1.7.0beta42, November 20, 2014, are
|
||||
* libpng versions 1.2.6, August 15, 2004, through 1.7.0beta45, December 28, 2014, are
|
||||
* Copyright (c) 2004, 2006-2013 Glenn Randers-Pehrson, and are
|
||||
* distributed according to the same disclaimer and license as libpng-1.2.5
|
||||
* with the following individual added to the list of Contributing Authors:
|
||||
@@ -312,13 +312,13 @@
|
||||
* Y2K compliance in libpng:
|
||||
* =========================
|
||||
*
|
||||
* November 20, 2014
|
||||
* December 28, 2014
|
||||
*
|
||||
* 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.7.0beta42 are Y2K compliant. It is my belief that
|
||||
* upward through 1.7.0beta45 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
|
||||
@@ -380,9 +380,9 @@
|
||||
*/
|
||||
|
||||
/* Version information for png.h - this should match the version in png.c */
|
||||
#define PNG_LIBPNG_VER_STRING "1.7.0beta42"
|
||||
#define PNG_LIBPNG_VER_STRING "1.7.0beta45"
|
||||
#define PNG_HEADER_VERSION_STRING \
|
||||
" libpng version 1.7.0beta42 - November 20, 2014\n"
|
||||
" libpng version 1.7.0beta45 - December 28, 2014\n"
|
||||
|
||||
#define PNG_LIBPNG_VER_SONUM 17
|
||||
#define PNG_LIBPNG_VER_DLLNUM 17
|
||||
@@ -396,7 +396,7 @@
|
||||
* PNG_LIBPNG_VER_STRING, omitting any leading zero:
|
||||
*/
|
||||
|
||||
#define PNG_LIBPNG_VER_BUILD 42
|
||||
#define PNG_LIBPNG_VER_BUILD 45
|
||||
|
||||
/* Release Status */
|
||||
#define PNG_LIBPNG_BUILD_ALPHA 1
|
||||
@@ -647,7 +647,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_7_0beta42;
|
||||
typedef char* png_libpng_version_1_7_0beta45;
|
||||
|
||||
/* Basic control structions. Read libpng-manual.txt or libpng.3 for more info.
|
||||
*
|
||||
|
||||
22
pngconf.h
22
pngconf.h
@@ -1,7 +1,7 @@
|
||||
|
||||
/* pngconf.h - machine configurable file for libpng
|
||||
*
|
||||
* libpng version 1.7.0beta42 - November 20, 2014
|
||||
* libpng version 1.7.0beta45 - December 28, 2014
|
||||
*
|
||||
* Copyright (c) 1998-2013 Glenn Randers-Pehrson
|
||||
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
||||
@@ -22,26 +22,6 @@
|
||||
#ifndef PNGCONF_H
|
||||
#define PNGCONF_H
|
||||
|
||||
/* To do: Do all of this in scripts/pnglibconf.dfa */
|
||||
#ifdef PNG_SAFE_LIMITS_SUPPORTED
|
||||
# ifdef PNG_USER_WIDTH_MAX
|
||||
# undef PNG_USER_WIDTH_MAX
|
||||
# define PNG_USER_WIDTH_MAX 1000000L
|
||||
# endif
|
||||
# ifdef PNG_USER_HEIGHT_MAX
|
||||
# undef PNG_USER_HEIGHT_MAX
|
||||
# define PNG_USER_HEIGHT_MAX 1000000L
|
||||
# endif
|
||||
# ifdef PNG_USER_CHUNK_MALLOC_MAX
|
||||
# undef PNG_USER_CHUNK_MALLOC_MAX
|
||||
# define PNG_USER_CHUNK_MALLOC_MAX 4000000L
|
||||
# endif
|
||||
# ifdef PNG_USER_CHUNK_CACHE_MAX
|
||||
# undef PNG_USER_CHUNK_CACHE_MAX
|
||||
# define PNG_USER_CHUNK_CACHE_MAX 128
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifndef PNG_BUILDING_SYMBOL_TABLE /* else includes may cause problems */
|
||||
|
||||
/* From libpng 1.6.0 libpng requires an ANSI X3.159-1989 ("ISOC90") compliant C
|
||||
|
||||
43
pngpriv.h
43
pngpriv.h
@@ -347,46 +347,9 @@
|
||||
|
||||
/* SECURITY and SAFETY:
|
||||
*
|
||||
* By default libpng is built without any internal limits on image size,
|
||||
* individual heap (png_malloc) allocations or the total amount of memory used.
|
||||
* If PNG_SAFE_LIMITS_SUPPORTED is defined, however, the limits below are used
|
||||
* (unless individually overridden). These limits are believed to be fairly
|
||||
* safe, but builders of secure systems should verify the values against the
|
||||
* real system capabilities.
|
||||
*/
|
||||
#ifdef PNG_SAFE_LIMITS_SUPPORTED
|
||||
/* 'safe' limits */
|
||||
# ifndef PNG_USER_WIDTH_MAX
|
||||
# define PNG_USER_WIDTH_MAX 1000000
|
||||
# endif
|
||||
# ifndef PNG_USER_HEIGHT_MAX
|
||||
# define PNG_USER_HEIGHT_MAX 1000000
|
||||
# endif
|
||||
# ifndef PNG_USER_CHUNK_CACHE_MAX
|
||||
# define PNG_USER_CHUNK_CACHE_MAX 128
|
||||
# endif
|
||||
# ifndef PNG_USER_CHUNK_MALLOC_MAX
|
||||
# define PNG_USER_CHUNK_MALLOC_MAX 8000000
|
||||
# endif
|
||||
#else
|
||||
/* values for no limits */
|
||||
# ifndef PNG_USER_WIDTH_MAX
|
||||
# define PNG_USER_WIDTH_MAX 0x7fffffff
|
||||
# endif
|
||||
# ifndef PNG_USER_HEIGHT_MAX
|
||||
# define PNG_USER_HEIGHT_MAX 0x7fffffff
|
||||
# endif
|
||||
# ifndef PNG_USER_CHUNK_CACHE_MAX
|
||||
# define PNG_USER_CHUNK_CACHE_MAX 0
|
||||
# endif
|
||||
# ifndef PNG_USER_CHUNK_MALLOC_MAX
|
||||
# define PNG_USER_CHUNK_MALLOC_MAX 0
|
||||
# endif
|
||||
#endif
|
||||
|
||||
/* Moved to pngpriv.h at libpng-1.5.0 */
|
||||
/* NOTE: some of these may have been used in external applications as
|
||||
* these definitions were exposed in pngconf.h prior to 1.5.
|
||||
* libpng is built with support for internal limits on image dimensions and
|
||||
* memory usage. These are documented in scripts/pnglibconf.dfa of the
|
||||
* source and recorded in the machine generated header file pnglibconf.h.
|
||||
*/
|
||||
|
||||
/* If you are running on a machine where you cannot allocate more
|
||||
|
||||
@@ -2974,7 +2974,7 @@ png_combine_row(png_const_structrp png_ptr, png_bytep dp, int display)
|
||||
{
|
||||
unsigned int pixel_depth = png_ptr->transformed_pixel_depth;
|
||||
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;
|
||||
png_bytep end_ptr = 0;
|
||||
png_byte end_byte = 0;
|
||||
@@ -3247,7 +3247,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. */
|
||||
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. */
|
||||
@@ -3427,7 +3427,7 @@ png_combine_row(png_const_structrp png_ptr, png_bytep dp, int display)
|
||||
dp += bytes_to_jump;
|
||||
row_width -= bytes_to_jump;
|
||||
if (bytes_to_copy > row_width)
|
||||
bytes_to_copy = row_width;
|
||||
bytes_to_copy = (unsigned int)/*SAFE*/row_width;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4205,7 +4205,7 @@ png_read_start_row(png_structrp png_ptr)
|
||||
|
||||
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
|
||||
* png_do_read_transforms actually does the transforms. This means that the
|
||||
* code which effectively calculates this value is actually repeated in three
|
||||
|
||||
@@ -2008,4 +2008,4 @@ main(void)
|
||||
#endif
|
||||
|
||||
/* Generate a compiler error if there is an old png.h in the search path. */
|
||||
typedef png_libpng_version_1_7_0beta42 Your_png_h_is_not_version_1_7_0beta42;
|
||||
typedef png_libpng_version_1_7_0beta45 Your_png_h_is_not_version_1_7_0beta45;
|
||||
|
||||
15
pngusr.dfa
15
pngusr.dfa
@@ -4,11 +4,12 @@
|
||||
#
|
||||
# Enter build configuration options in this file
|
||||
#
|
||||
# Security settings: by default these limits are unset, you can change them
|
||||
# here by entering the appropriate values as #defines preceded by '@' (to cause,
|
||||
# them to be passed through to the build of pnglibconf.h), for example:
|
||||
# Security settings: these limits have default values that are set in
|
||||
# scripts/pnglibconf.dfa; you can change them here by entering the
|
||||
# appropriate values as #defines preceded by '@' (to cause them
|
||||
# to be passed through to the build of pnglibconf.h), for example:
|
||||
#
|
||||
# @# define PNG_USER_WIDTH_MAX 1000000
|
||||
# @# define PNG_USER_HEIGHT_MAX 1000000
|
||||
# @# define PNG_USER_CHUNK_CACHE_MAX 128
|
||||
# @# define PNG_USER_CHUNK_MALLOC_MAX 8000000
|
||||
# @# define PNG_USER_WIDTH_MAX 65535
|
||||
# @# define PNG_USER_HEIGHT_MAX 65535
|
||||
# @# define PNG_USER_CHUNK_CACHE_MAX 256
|
||||
# @# define PNG_USER_CHUNK_MALLOC_MAX 1000000
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
|
||||
VisualStudio instructions
|
||||
|
||||
libpng version 1.7.0beta42 - November 20, 2014
|
||||
libpng version 1.7.0beta45 - December 28, 2014
|
||||
|
||||
Copyright (c) 1998-2010 Glenn Randers-Pehrson
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<!--
|
||||
* zlib.props - location of zlib source
|
||||
*
|
||||
* libpng version 1.7.0beta42 - November 20, 2014
|
||||
* libpng version 1.7.0beta45 - December 28, 2014
|
||||
*
|
||||
* Copyright (c) 1998-2011 Glenn Randers-Pehrson
|
||||
*
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
|
||||
Makefiles for libpng version 1.7.0beta42 - November 20, 2014
|
||||
Makefiles for libpng version 1.7.0beta45 - December 28, 2014
|
||||
|
||||
pnglibconf.h.prebuilt => Stores configuration settings
|
||||
makefile.linux => Linux/ELF makefile
|
||||
(gcc, creates libpng17.so.17.1.7.0beta42)
|
||||
(gcc, creates libpng17.so.17.1.7.0beta45)
|
||||
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 libpng17.so.17.1.7.0beta42)
|
||||
creates libpng17.so.17.1.7.0beta45)
|
||||
makefile.sgi => Silicon Graphics IRIX makefile (cc, creates static lib)
|
||||
makefile.solaris => Solaris 2.X makefile (gcc,
|
||||
creates libpng17.so.17.1.7.0beta42)
|
||||
creates libpng17.so.17.1.7.0beta45)
|
||||
makefile.so9 => Solaris 9 makefile (gcc,
|
||||
creates libpng17.so.17.1.7.0beta42)
|
||||
creates libpng17.so.17.1.7.0beta45)
|
||||
makefile.std => Generic UNIX makefile (cc, creates static libpng.a)
|
||||
makefile.sunos => Sun makefile
|
||||
makefile.32sunu => Sun Ultra 32-bit makefile
|
||||
|
||||
@@ -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]
|
||||
* Copyright (c) 2010-2011 Glenn Randers-Pehrson
|
||||
* Last changed in libpng version 1.6.16 [(PENDING RELEASE)]
|
||||
* Copyright (c) 2011-2014 Glenn Randers-Pehrson
|
||||
*
|
||||
* This code is released under the libpng license.
|
||||
* 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 ""
|
||||
PNG_DFN "EXPORTS"
|
||||
PNG_DFN ";Version 1.7.0beta42"
|
||||
PNG_DFN ";Version 1.7.0beta45"
|
||||
|
||||
#define PNG_EXPORTA(ordinal, type, name, args, attributes)\
|
||||
PNG_DFN "@" SYMBOL_PREFIX "@@" name "@"
|
||||
@@ -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]
|
||||
* Copyright (c) 2012 Glenn Randers-Pehrson
|
||||
* Last changed in libpng version 1.6.16 [(PENDING RELEASE)]
|
||||
* Copyright (c) 2013-2014 Glenn Randers-Pehrson
|
||||
*
|
||||
* This code is released under the libpng license.
|
||||
* For conditions of distribution and use, see the disclaimer
|
||||
@@ -11,7 +11,7 @@
|
||||
|
||||
# Modeled after libxml-config.
|
||||
|
||||
version=1.7.0beta42
|
||||
version=1.7.0beta45
|
||||
prefix=""
|
||||
libdir=""
|
||||
libs=""
|
||||
|
||||
@@ -5,6 +5,6 @@ includedir=@includedir@/libpng17
|
||||
|
||||
Name: libpng
|
||||
Description: Loads and saves PNG files
|
||||
Version: 1.7.0beta42
|
||||
Version: 1.7.0beta45
|
||||
Libs: -L${libdir} -lpng17
|
||||
Cflags: -I${includedir}
|
||||
|
||||
@@ -17,7 +17,7 @@ INCSDIR=${LOCALBASE}/include/libpng17
|
||||
|
||||
LIB= png17
|
||||
SHLIB_MAJOR= 0
|
||||
SHLIB_MINOR= 1.7.0beta42
|
||||
SHLIB_MINOR= 1.7.0beta45
|
||||
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
|
||||
|
||||
@@ -17,7 +17,7 @@ INCSDIR=${LOCALBASE}/include
|
||||
|
||||
LIB= png
|
||||
SHLIB_MAJOR= 17
|
||||
SHLIB_MINOR= 1.7.0beta42
|
||||
SHLIB_MINOR= 1.7.0beta45
|
||||
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
|
||||
|
||||
@@ -11,7 +11,7 @@ LIBDIR= ${PREFIX}/lib
|
||||
MANDIR= ${PREFIX}/man/cat
|
||||
|
||||
SHLIB_MAJOR= 17
|
||||
SHLIB_MINOR= 1.7.0beta42
|
||||
SHLIB_MINOR= 1.7.0beta45
|
||||
|
||||
LIB= png
|
||||
SRCS= png.c pngerror.c pngget.c pngmem.c pngpread.c \
|
||||
|
||||
@@ -328,7 +328,7 @@ option BENIGN_READ_ERRORS requires BENIGN_ERRORS
|
||||
option MNG_FEATURES
|
||||
|
||||
# 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.
|
||||
#
|
||||
# Prior to libpng 1.6.8 one of the API (_POINT) variants had to be selected. At
|
||||
@@ -381,9 +381,9 @@ option IO_STATE
|
||||
|
||||
option USER_LIMITS requires READ
|
||||
|
||||
# If these settings are *not* set libpng will not limit the size of
|
||||
# images or the size of data in ancilliary chunks. This does lead to
|
||||
# security issues if PNG files come from untrusted sources. Settings have the
|
||||
# The default settings given below for the limits mean that libpng will
|
||||
# limit the size of images or the size of data in ancilliary chunks to less
|
||||
# than the specification or implementation limits. Settings have the
|
||||
# following interpretations:
|
||||
#
|
||||
# USER_WIDTH_MAX: maximum width of an image that will be read
|
||||
@@ -393,17 +393,10 @@ option USER_LIMITS requires READ
|
||||
#
|
||||
# Only chunks that are variable in number are counted towards the
|
||||
# USER_CHUNK_CACHE_MAX limit
|
||||
setting USER_WIDTH_MAX
|
||||
setting USER_HEIGHT_MAX
|
||||
setting USER_CHUNK_CACHE_MAX
|
||||
setting USER_CHUNK_MALLOC_MAX
|
||||
|
||||
# To default all these settings to values that are large but probably
|
||||
# safe turn the SAFE_LIMITS option on; this will cause the value in
|
||||
# pngpriv.h to be used. Individual values can also be set, simply set
|
||||
# them in pngusr.dfa with '@#define PNG_setting value' lines.
|
||||
option SAFE_LIMITS enables USER_LIMITS disabled
|
||||
= SAFE_LIMITS SAFE_LIMITS
|
||||
setting USER_WIDTH_MAX default 1000000 /* Use 0x7fffffff for unlimited */
|
||||
setting USER_HEIGHT_MAX default 1000000 /* Use 0x7fffffff for unlimited */
|
||||
setting USER_CHUNK_CACHE_MAX default 128 /* Use 0 for unlimited */
|
||||
setting USER_CHUNK_MALLOC_MAX default 8000000 /* Use 0 for unlimited */
|
||||
|
||||
# If this option is enabled APIs to set the above limits at run time are added;
|
||||
# without this the hardwired (compile time) limits will be used.
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
/* libpng 1.7.0beta42 STANDARD API DEFINITION */
|
||||
/* libpng 1.7.0beta45 STANDARD API DEFINITION */
|
||||
|
||||
/* pnglibconf.h - library build configuration */
|
||||
|
||||
/* Libpng version 1.7.0beta42 - November 20, 2014 */
|
||||
/* Libpng version 1.7.0beta45 - December 28, 2014 */
|
||||
|
||||
/* Copyright (c) 1998-2014 Glenn Randers-Pehrson */
|
||||
|
||||
@@ -97,7 +97,6 @@
|
||||
#define PNG_READ_tIME_SUPPORTED
|
||||
#define PNG_READ_tRNS_SUPPORTED
|
||||
#define PNG_READ_zTXt_SUPPORTED
|
||||
/*#undef PNG_SAFE_LIMITS_SUPPORTED*/
|
||||
#define PNG_SAVE_INT_32_SUPPORTED
|
||||
#define PNG_SAVE_UNKNOWN_CHUNKS_SUPPORTED
|
||||
#define PNG_SEQUENTIAL_READ_SUPPORTED
|
||||
@@ -197,10 +196,14 @@
|
||||
#define PNG_QUANTIZE_RED_BITS 5
|
||||
#define PNG_TEXT_Z_DEFAULT_COMPRESSION (-1)
|
||||
#define PNG_TEXT_Z_DEFAULT_STRATEGY 0
|
||||
#define PNG_USER_CHUNK_CACHE_MAX 128 /* Use 0 for unlimited */
|
||||
#define PNG_USER_CHUNK_MALLOC_MAX 8000000 /* Use 0 for unlimited */
|
||||
#define PNG_USER_HEIGHT_MAX 1000000 /* Use 0x7fffffff for unlimited */
|
||||
#define PNG_USER_WIDTH_MAX 1000000 /* Use 0x7fffffff for unlimited */
|
||||
#define PNG_WEIGHT_SHIFT 8
|
||||
#define PNG_ZLIB_VERNUM 0 /* unknown */
|
||||
#define PNG_ZBUF_SIZE 8192
|
||||
#define PNG_ZLIB_HEADER <zlib.h>
|
||||
#define PNG_ZLIB_VERNUM 0 /* unknown */
|
||||
#define PNG_Z_DEFAULT_COMPRESSION (-1)
|
||||
#define PNG_Z_DEFAULT_NOFILTER_STRATEGY 0
|
||||
#define PNG_Z_DEFAULT_STRATEGY 1
|
||||
|
||||
@@ -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]
|
||||
* Copyright (c) 2012 Glenn Randers-Pehrson
|
||||
* Last changed in libpng version 1.6.16 [(PENDING RELEASE)]
|
||||
* Copyright (c) 2013-2014 Glenn Randers-Pehrson
|
||||
*
|
||||
* This code is released under the libpng license.
|
||||
* For conditions of distribution and use, see the disclaimer
|
||||
@@ -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]
|
||||
* Copyright (c) 1998-2011 Glenn Randers-Pehrson
|
||||
* Last changed in libpng version 1.6.16 [(PENDING RELEASE)]
|
||||
* Copyright (c) 2011-2014 Glenn Randers-Pehrson
|
||||
*
|
||||
* This code is released under the libpng license.
|
||||
* For conditions of distribution and use, see the disclaimer
|
||||
@@ -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]
|
||||
* Copyright (c) 1998-2011 Glenn Randers-Pehrson
|
||||
* Last changed in libpng version 1.6.16 [(PENDING RELEASE)]
|
||||
* Copyright (c) 2011-2014 Glenn Randers-Pehrson
|
||||
*
|
||||
* This code is released under the libpng license.
|
||||
* For conditions of distribution and use, see the disclaimer
|
||||
@@ -1,4 +1,4 @@
|
||||
;Version 1.7.0beta42
|
||||
;Version 1.7.0beta45
|
||||
;--------------------------------------------------------------
|
||||
; LIBPNG symbol list as a Win32 DEF file
|
||||
; Contains all the symbols that can be exported from libpng
|
||||
|
||||
@@ -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]
|
||||
* Copyright (c) 1998-2011 Glenn Randers-Pehrson
|
||||
* Last changed in libpng version 1.6.16 [(PENDING RELEASE)]
|
||||
* Copyright (c) 2011-2014 Glenn Randers-Pehrson
|
||||
*
|
||||
* This code is released under the libpng license.
|
||||
* For conditions of distribution and use, see the disclaimer
|
||||
Reference in New Issue
Block a user