Compare commits

...

25 Commits

Author SHA1 Message Date
Glenn Randers-Pehrson
7184475a98 [libpng16] Imported from libpng-1.6.26beta02.tar 2016-10-01 19:44:32 -05:00
Glenn Randers-Pehrson
c180e7a437 [libpng16] Updated CHANGES and ANNOUNCE 2016-09-30 21:54:06 -05:00
Glenn Randers-Pehrson
fbe3e002bc Merge branch 'libpng16' of git://github.com/jbowler/libpng into libpng16 2016-09-30 21:51:27 -05:00
Glenn Randers-Pehrson
b5b77a72b4 Revert "[libpng16] Quieted about 100 warnings from clang-3.8 in pngtrans.c, pngread.c,"
This reverts commit 97dfccb632.
2016-09-30 21:34:21 -05:00
Glenn Randers-Pehrson
97dfccb632 [libpng16] Quieted about 100 warnings from clang-3.8 in pngtrans.c, pngread.c,
pngwrite.c, pngunknown.c, and pngvalid.c.  Several warnings still remain
in pngvalid.c
2016-09-30 21:02:03 -05:00
John Bowler
319c9852bf Unsigned overflow
Remove all currently detected cases of unsigned overflow.  Detection is
runtime, so test case dependent.  The changes to pngvalid.c eliminate
spurious and probably invalid tests with one while loop exception.

Apart from that and the change to the dependence on the intended
unsigned overflow in pngtrans.c the changes are limited to altering the
meme for an unsigned 'x' from:

   while (x-- > 0)

to

   for (; x > 0; --x)

This works because, in all cases, the control variable is not used in
the loop.  The 'while' meme was, at one time, warn'ed by GCC so it is
probably a good change, for some weird religious value of good.

Signed-off-by: John Bowler <jbowler@acm.org>
2016-09-30 18:37:22 -07:00
Glenn Randers-Pehrson
1b363fa6b0 [libpng16] Quieted 116 (out of 288) -Wconversion compiler warnings by changing
flag definitions in pngpriv.h from 0xnnnn to 0xnnnnU and trivial changes
in png.c, pngread.c, and pngwutil.c.
2016-09-30 17:19:12 -05:00
Glenn Randers-Pehrson
fa24421216 [libpng16] Quieted 74 (out of 288) -Wconversion compiler warnings by changing
flag definitions in pngpriv.h from 0xnnnn to 0xnnnnU.
2016-09-30 16:26:07 -05:00
Glenn Randers-Pehrson
d84fd77bf8 [libpng16] Quieted a warning from clang-3.8 in pngtrans.c. 2016-09-30 14:22:57 -05:00
Glenn Randers-Pehrson
04dab1e82d [libpng16] Updated the documentation about CRC and ADLER32 handling. 2016-09-26 11:15:22 -05:00
Glenn Randers-Pehrson
394be58371 [libpng16] Bump version to 1.6.26beta02 2016-09-26 08:58:04 -05:00
Glenn Randers-Pehrson
217546ae43 [libpng16] Imported from libpng-1.6.26beta01.tar 2016-09-26 08:57:44 -05:00
Glenn Randers-Pehrson
8aa1638ccc [libpng16] Add tests/badcrc.png and tests/badadler.png to tests/pngtest.
Merged pngtest.c with libpng-1.7.0beta84/pngtest.c
2016-09-26 08:09:44 -05:00
Glenn Randers-Pehrson
89ea081433 [libpng16] If CRC handling of critical chunks has been set to PNG_CRC_QUIET_USE,
ignore the ADLER32 checksum in the IDAT chunk as well as the chunk CRCs.
2016-09-25 17:42:15 -05:00
Glenn Randers-Pehrson
7835716cef [libpng16] Changed PNG_ZLIB_VERNUM to ZLIB_VERNUM in pngpriv.h, pngstruct.h,
and pngrutil.c.
2016-09-19 16:46:54 -05:00
Glenn Randers-Pehrson
cb1787f033 [libpng16] Conditionally compile png_set_benign_error in pngtest.c 2016-09-11 22:02:57 -05:00
Glenn Randers-Pehrson
1842d7c865 [libpng16] Issue a png_benign_error instead of a png_error on ADLER32 mismatch
while decoding compressed data chunks.
2016-09-11 22:02:05 -05:00
Glenn Randers-Pehrson
bc2bb96cd7 [libpng16] Conditionally compile png_set_benign_errors() in pngread.c 2016-09-11 19:22:28 -05:00
Glenn Randers-Pehrson
5cb1700702 [libpng16] Update CHANGES and ANNOUNCE and last-changed date in pngset.c 2016-09-03 11:51:29 -05:00
John Bowler
7dc0329250 [libpng16] png_set_pCAL: do not png_error on read
Because png_handle_pCAL has allocated memory to free.

Signed-off-by: John Bowler <jbowler@acm.org>
2016-09-02 19:26:42 -07:00
Glenn Randers-Pehrson
90ea4af4a1 [libpng16] Update CHANGES and ANNOUNCE 2016-09-01 17:28:08 -05:00
Glenn Randers-Pehrson
a744b11975 Merge branch 'libpng16' of git://github.com/jbowler/libpng into libpng16 2016-09-01 17:11:57 -05:00
John Bowler
597b1a1b5e Merge branch 'libpng16' of ../../libpng into libpng16 2016-09-01 13:27:58 -07:00
John Bowler
f0b453bc3e [libpng16] pngfix zero-length IDAT fix
When an input file contains a zero length IDAT and pngfix is not applying the
IDAT rechunking (--max) option pngfix will go into a loop writing the zero
length IDAT for ever.

This is a fairly minor issue for interactive use; zero length IDAT is very rare,
the problem is obvious (pngfix hangs) and the fix (use --max, or --max=4096
etc), while not obvious, is easy.

For non-interactive use, e.g. trying to automatically repair a PNG that cannot
be read by libpng, there are security consequences:

1) pngfix hangs.  This may permit a DoS attack.
2) When the --out option is used pngfix will just keep writing.  This is a very
likely DoS scenario.

Signed-off-by: John Bowler <jbowler@acm.org>
2016-09-01 07:22:40 -07:00
Glenn Randers-Pehrson
c9d7b865b6 [libpng16] Bump version to 1.6.26beta01 2016-08-31 23:19:25 -05:00
47 changed files with 395 additions and 284 deletions

View File

@@ -1,36 +1,55 @@
Libpng 1.6.25 - September 1, 2016
Libpng 1.6.26beta02 - October 1, 2016
This is a public release of libpng, intended for use in production codes.
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.
Files available for download:
Source files with LF line endings (for Unix/Linux) and with a
"configure" script
libpng-1.6.25.tar.xz (LZMA-compressed, recommended)
libpng-1.6.25.tar.gz
1.6.26beta02.tar.xz (LZMA-compressed, recommended)
1.6.26beta02.tar.gz
Source files with CRLF line endings (for Windows), without the
"configure" script
lpng1625.7z (LZMA-compressed, recommended)
lpng1625.zip
lp1626b02.7z (LZMA-compressed, recommended)
lp1626b02.zip
Other information:
libpng-1.6.25-README.txt
libpng-1.6.25-LICENSE.txt
libpng-1.6.25-*.asc (armored detached GPG signatures)
1.6.26beta02-README.txt
1.6.26beta02-LICENSE.txt
libpng-1.6.26beta02-*.asc (armored detached GPG signatures)
Changes since the last public release (1.6.24):
Reject oversized iCCP profile immediately.
Cleaned up PNG_DEBUG compile of pngtest.c.
Conditionally compile png_inflate().
Don't install pngcp; it conflicts with pngcp in the pngtools package.
Minor editing of INSTALL, (whitespace, added copyright line)
Added MIPS support (Mandar Sahastrabuddhe <Mandar.Sahastrabuddhe@imgtec.com>).
Rebased contrib/intel/intel_sse.patch after the MIPS implementation.
Changes since the last public release (1.6.25):
Version 1.6.26beta01 [September 26, 2016]
Fixed handling zero length IDAT in pngfix (bug report by Agostino Sarubbo,
bugfix by John Bowler).
Do not issue a png_error() on read in png_set_pCAL() because png_handle_pCAL
has allocated memory that libpng needs to free.
Conditionally compile png_set_benign_errors() in pngread.c and pngtest.c
Issue a png_benign_error instead of a png_error on ADLER32 mismatch
while decoding compressed data chunks.
Changed PNG_ZLIB_VERNUM to ZLIB_VERNUM in pngpriv.h, pngstruct.h, and
pngrutil.c.
If CRC handling of critical chunks has been set to PNG_CRC_QUIET_USE,
ignore the ADLER32 checksum in the IDAT chunk as well as the chunk CRCs.
Issue png_benign_error() on ADLER32 checksum mismatch instead of png_error().
Add tests/badcrc.png and tests/badadler.png to tests/pngtest.
Merged pngtest.c with libpng-1.7.0beta84/pngtest.c
Version 1.6.26beta02 [October 1, 2016]
Updated the documentation about CRC and ADLER32 handling.
Quieted 117 warnings from clang-3.8 in pngtrans.c, pngread.c,
pngwrite.c, pngunknown.c, and pngvalid.c.
Quieted 116 (out of 288) -Wconversion compiler warnings by changing
flag definitions in pngpriv.h from 0xnnnn to 0xnnnnU and trivial changes
in png.c, pngread.c, and pngwutil.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
to subscribe)

24
CHANGES
View File

@@ -5703,6 +5703,30 @@ Version 1.6.25rc05 [August 30, 2016]
Version 1.6.25 [September 1, 2016]
No changes.
Version 1.6.26beta01 [September 26, 2016]
Fixed handling zero length IDAT in pngfix (bug report by Agostino Sarubbo,
bugfix by John Bowler).
Do not issue a png_error() on read in png_set_pCAL() because png_handle_pCAL
has allocated memory that libpng needs to free.
Conditionally compile png_set_benign_errors() in pngread.c and pngtest.c
Issue a png_benign_error instead of a png_error on ADLER32 mismatch
while decoding compressed data chunks.
Changed PNG_ZLIB_VERNUM to ZLIB_VERNUM in pngpriv.h, pngstruct.h, and
pngrutil.c.
If CRC handling of critical chunks has been set to PNG_CRC_QUIET_USE,
ignore the ADLER32 checksum in the IDAT chunk as well as the chunk CRCs.
Issue png_benign_error() on ADLER32 checksum mismatch instead of png_error().
Add tests/badcrc.png and tests/badadler.png to tests/pngtest.
Merged pngtest.c with libpng-1.7.0beta84/pngtest.c
Version 1.6.26beta02 [October 1, 2016]
Updated the documentation about CRC and ADLER32 handling.
Quieted 117 warnings from clang-3.8 in pngtrans.c, pngread.c,
pngwrite.c, pngunknown.c, and pngvalid.c.
Quieted 116 (out of 288) -Wconversion compiler warnings by changing
flag definitions in pngpriv.h from 0xnnnn to 0xnnnnU and trivial changes
in png.c, pngread.c, and pngwutil.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

View File

@@ -35,7 +35,7 @@ enable_testing()
set(PNGLIB_MAJOR 1)
set(PNGLIB_MINOR 6)
set(PNGLIB_RELEASE 25)
set(PNGLIB_RELEASE 26)
set(PNGLIB_NAME libpng${PNGLIB_MAJOR}${PNGLIB_MINOR})
set(PNGLIB_VERSION ${PNGLIB_MAJOR}.${PNGLIB_MINOR}.${PNGLIB_RELEASE})
@@ -696,7 +696,7 @@ endif(NOT WIN32 OR CYGWIN OR MINGW)
# SET UP LINKS
if(PNG_SHARED)
set_target_properties(png PROPERTIES
# VERSION 16.${PNGLIB_RELEASE}.1.6.25
# VERSION 16.${PNGLIB_RELEASE}.1.6.26beta02
VERSION 16.${PNGLIB_RELEASE}.0
SOVERSION 16
CLEAN_DIRECT_OUTPUT 1)

View File

@@ -10,7 +10,7 @@ this sentence.
This code is released under the libpng license.
libpng versions 1.0.7, July 1, 2000 through 1.6.25, September 1, 2016 are
libpng versions 1.0.7, July 1, 2000 through 1.6.26beta02, October 1, 2016 are
Copyright (c) 2000-2002, 2004, 2006-2016 Glenn Randers-Pehrson, are
derived from libpng-1.0.6, and are distributed according to the same
disclaimer and license as libpng-1.0.6 with the following individuals
@@ -127,4 +127,4 @@ any encryption software. See the EAR, paragraphs 734.3(b)(3) and
Glenn Randers-Pehrson
glennrp at users.sourceforge.net
September 1, 2016
October 1, 2016

View File

@@ -1,7 +1,7 @@
# Makefile.am, the source file for Makefile.in (and hence Makefile), is
#
# Copyright (c) 2004-2016 Glenn Randers-Pehrson
# Last changed in libpng 1.6.25 [September 1, 2016]
# Last changed in libpng 1.6.25 [(PENDING RELEASE)]
#
# This code is released under the libpng license.
# For conditions of distribution and use, see the disclaimer

2
README
View File

@@ -1,4 +1,4 @@
README for libpng version 1.6.25 - September 1, 2016 (shared library 16.0)
README for libpng version 1.6.26beta02 - October 1, 2016 (shared library 16.0)
See the note about version numbers near the top of png.h
See INSTALL for instructions on how to install libpng.

1
TODO
View File

@@ -26,5 +26,6 @@ Investigate pre-incremented loop counters and other loop constructions.
Add interpolated method of handling interlacing.
Switch to the simpler zlib (zlib/libpng) license if legally possible.
Extend pngvalid.c to validate more of the libpng transformations.
Quiet remaining compiler warnings (mostly -Wconversion warnings).
*/

View File

@@ -1,7 +1,7 @@
# configure.ac
# Copyright (c) 2004-2016 Glenn Randers-Pehrson
# Last changed in libpng 1.6.25 [September 1, 2016]
# Last changed in libpng 1.6.25 [(PENDING RELEASE)]
# This code is released under the libpng license.
# For conditions of distribution and use, see the disclaimer
@@ -25,7 +25,7 @@ AC_PREREQ([2.68])
dnl Version number stuff here:
AC_INIT([libpng],[1.6.25],[png-mng-implement@lists.sourceforge.net])
AC_INIT([libpng],[1.6.26beta02],[png-mng-implement@lists.sourceforge.net])
AC_CONFIG_MACRO_DIR([scripts])
# libpng does not follow GNU file name conventions (hence 'foreign')
@@ -46,10 +46,10 @@ dnl automake, so the following is not necessary (and is not defined anyway):
dnl AM_PREREQ([1.11.2])
dnl stop configure from automagically running automake
PNGLIB_VERSION=1.6.25
PNGLIB_VERSION=1.6.26beta02
PNGLIB_MAJOR=1
PNGLIB_MINOR=6
PNGLIB_RELEASE=25
PNGLIB_RELEASE=26
dnl End of version number stuff

View File

@@ -478,7 +478,7 @@ get_valid(display *d, png_infop info_ptr)
png_textp text;
png_uint_32 ntext = png_get_text(d->png_ptr, info_ptr, &text, NULL);
while (ntext-- > 0) switch (text[ntext].compression)
while (ntext > 0) switch (text[--ntext].compression)
{
case -1:
flags |= PNG_INFO_tEXt;

View File

@@ -1242,7 +1242,7 @@ store_image_check(const png_store* ps, png_const_structp pp, int iImage)
image += 2; /* skip image first row markers */
while (rows-- > 0)
for (; rows > 0; --rows)
{
if (image[-2] != 190 || image[-1] != 239)
png_error(pp, "row start overwritten");
@@ -11427,23 +11427,36 @@ perform_interlace_macro_validation(void)
*/
for (v=0;;)
{
/* The first two tests overflow if the pass row or column is outside
* the possible range for a 32-bit result. In fact the values should
* never be outside the range for a 31-bit result, but checking for 32
* bits here ensures that if an app uses a bogus pass row or column
* (just so long as it fits in a 32 bit integer) it won't get a
* possibly dangerous overflow.
*/
/* First the base 0 stuff: */
m = PNG_ROW_FROM_PASS_ROW(v, pass);
f = png_row_from_pass_row(v, pass);
if (m != f)
if (v < png_pass_rows(0xFFFFFFFFU, pass))
{
fprintf(stderr, "PNG_ROW_FROM_PASS_ROW(%u, %d) = %u != %x\n",
v, pass, m, f);
exit(99);
m = PNG_ROW_FROM_PASS_ROW(v, pass);
f = png_row_from_pass_row(v, pass);
if (m != f)
{
fprintf(stderr, "PNG_ROW_FROM_PASS_ROW(%u, %d) = %u != %x\n",
v, pass, m, f);
exit(99);
}
}
m = PNG_COL_FROM_PASS_COL(v, pass);
f = png_col_from_pass_col(v, pass);
if (m != f)
if (v < png_pass_cols(0xFFFFFFFFU, pass))
{
fprintf(stderr, "PNG_COL_FROM_PASS_COL(%u, %d) = %u != %x\n",
v, pass, m, f);
exit(99);
m = PNG_COL_FROM_PASS_COL(v, pass);
f = png_col_from_pass_col(v, pass);
if (m != f)
{
fprintf(stderr, "PNG_COL_FROM_PASS_COL(%u, %d) = %u != %x\n",
v, pass, m, f);
exit(99);
}
}
m = PNG_ROW_IN_INTERLACE_PASS(v, pass);

View File

@@ -2,7 +2,7 @@
*
* Copyright (c) 2014-2016 John Cunningham Bowler
*
* Last changed in libpng 1.6.21 [January 15, 2016]
* Last changed in libpng 1.6.26 [(PENDING RELEASE)]
*
* This code is released under the libpng license.
* For conditions of distribution and use, see the disclaimer
@@ -1824,7 +1824,7 @@ IDAT_init(struct IDAT * const idat, struct file * const file)
}
static png_uint_32
rechunk_length(struct IDAT *idat)
rechunk_length(struct IDAT *idat, int start)
/* Return the length for the next IDAT chunk, taking into account
* rechunking.
*/
@@ -1836,7 +1836,7 @@ rechunk_length(struct IDAT *idat)
const struct IDAT_list *cur;
unsigned int count;
if (idat->idat_index == 0) /* at the new chunk (first time) */
if (start)
return idat->idat_length; /* use the cache */
/* Otherwise rechunk_length is called at the end of a chunk for the length
@@ -1995,7 +1995,7 @@ process_IDAT(struct file *file)
idat->idat_index = 0; /* Index into chunk data */
/* Update the chunk length to the correct value for the IDAT chunk: */
file->chunk->chunk_length = rechunk_length(idat);
file->chunk->chunk_length = rechunk_length(idat, 1/*start*/);
/* Change the state to writing IDAT chunks */
file->state = STATE_IDAT;
@@ -3473,7 +3473,8 @@ read_callback(png_structp png_ptr, png_bytep buffer, size_t count)
/* Write another IDAT chunk. Call rechunk_length to
* calculate the length required.
*/
length = chunk->chunk_length = rechunk_length(file->idat);
length = chunk->chunk_length =
rechunk_length(file->idat, 0/*end*/);
assert(type == png_IDAT);
file->write_count = 0; /* for the new chunk */
--(file->write_count); /* fake out the increment below */

View File

@@ -1,6 +1,6 @@
libpng-manual.txt - A description on how to use and modify libpng
libpng version 1.6.25 - September 1, 2016
libpng version 1.6.26beta02 - October 1, 2016
Updated and distributed by Glenn Randers-Pehrson
<glennrp at users.sourceforge.net>
Copyright (c) 1998-2016 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.6.25 - September 1, 2016
libpng versions 0.97, January 1998, through 1.6.26beta02 - October 1, 2016
Updated and distributed by Glenn Randers-Pehrson
Copyright (c) 1998-2016 Glenn Randers-Pehrson
@@ -467,8 +467,9 @@ the default, use
The values for png_set_crc_action() say how libpng is to handle CRC errors in
ancillary and critical chunks, and whether to use the data contained
therein. Note that it is impossible to "discard" data in a critical
chunk.
therein. Starting with libpng-1.6.26, this also governs how an ADLER32 error
is handled while reading the IDAT chunk. Note that it is impossible to
"discard" data in a critical chunk.
Choices for (int) crit_action are
PNG_CRC_DEFAULT 0 error/quit
@@ -485,6 +486,9 @@ Choices for (int) ancil_action are
PNG_CRC_QUIET_USE 4 quiet/use data
PNG_CRC_NO_CHANGE 5 use the current value
When the setting for crit_action is PNG_CRC_QUIET_USE, the CRC and ADLER32
checksums are not only ignored, but they are not evaluated.
Setting up callback code
You can set up a callback function to handle any unknown chunks in the
@@ -5350,7 +5354,7 @@ Since the PNG Development group is an ad-hoc body, we can't make
an official declaration.
This is your unofficial assurance that libpng from version 0.71 and
upward through 1.6.25 are Y2K compliant. It is my belief that earlier
upward through 1.6.26beta02 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

View File

@@ -1,6 +1,6 @@
.TH LIBPNG 3 "September 1, 2016"
.TH LIBPNG 3 "October 1, 2016"
.SH NAME
libpng \- Portable Network Graphics (PNG) Reference Library 1.6.25
libpng \- Portable Network Graphics (PNG) Reference Library 1.6.26beta02
.SH SYNOPSIS
\fB
#include <png.h>\fP
@@ -510,7 +510,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.6.25 - September 1, 2016
libpng version 1.6.26beta02 - October 1, 2016
Updated and distributed by Glenn Randers-Pehrson
<glennrp at users.sourceforge.net>
Copyright (c) 1998-2016 Glenn Randers-Pehrson
@@ -521,7 +521,7 @@ libpng-manual.txt - A description on how to use and modify libpng
Based on:
libpng versions 0.97, January 1998, through 1.6.25 - September 1, 2016
libpng versions 0.97, January 1998, through 1.6.26beta02 - October 1, 2016
Updated and distributed by Glenn Randers-Pehrson
Copyright (c) 1998-2016 Glenn Randers-Pehrson
@@ -977,8 +977,9 @@ the default, use
The values for png_set_crc_action() say how libpng is to handle CRC errors in
ancillary and critical chunks, and whether to use the data contained
therein. Note that it is impossible to "discard" data in a critical
chunk.
therein. Starting with libpng-1.6.26, this also governs how an ADLER32 error
is handled while reading the IDAT chunk. Note that it is impossible to
"discard" data in a critical chunk.
Choices for (int) crit_action are
PNG_CRC_DEFAULT 0 error/quit
@@ -995,6 +996,9 @@ Choices for (int) ancil_action are
PNG_CRC_QUIET_USE 4 quiet/use data
PNG_CRC_NO_CHANGE 5 use the current value
When the setting for crit_action is PNG_CRC_QUIET_USE, the CRC and ADLER32
checksums are not only ignored, but they are not evaluated.
.SS Setting up callback code
You can set up a callback function to handle any unknown chunks in the
@@ -5860,7 +5864,7 @@ Since the PNG Development group is an ad-hoc body, we can't make
an official declaration.
This is your unofficial assurance that libpng from version 0.71 and
upward through 1.6.25 are Y2K compliant. It is my belief that earlier
upward through 1.6.26beta02 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
@@ -5962,7 +5966,7 @@ the first widely used release:
...
1.5.27 15 10527 15.so.15.27[.0]
...
1.6.25 16 10625 16.so.16.25[.0]
1.6.26 16 10626 16.so.16.26[.0]
Henceforth the source version will match the shared-library minor
and patch numbers; the shared-library major version number will be
@@ -6018,7 +6022,7 @@ possible without all of you.
Thanks to Frank J. T. Wojcik for helping with the documentation.
Libpng version 1.6.25 - September 1, 2016:
Libpng version 1.6.26beta02 - October 1, 2016:
Initially created in 1995 by Guy Eric Schalnat, then of Group 42, Inc.
Currently maintained by Glenn Randers-Pehrson (glennrp at users.sourceforge.net).
@@ -6043,7 +6047,7 @@ this sentence.
This code is released under the libpng license.
libpng versions 1.0.7, July 1, 2000 through 1.6.25, September 1, 2016 are
libpng versions 1.0.7, July 1, 2000 through 1.6.26beta02, October 1, 2016 are
Copyright (c) 2000-2002, 2004, 2006-2016 Glenn Randers-Pehrson, are
derived from libpng-1.0.6, and are distributed according to the same
disclaimer and license as libpng-1.0.6 with the following individuals
@@ -6168,7 +6172,7 @@ files "pngbar.png" and "pngbar.jpg (88x31) and "pngnow.png" (98x31).
Glenn Randers-Pehrson
glennrp at users.sourceforge.net
September 1, 2016
October 1, 2016
.\" end of man page

View File

@@ -1,6 +1,6 @@
.TH LIBPNGPF 3 "September 1, 2016"
.TH LIBPNGPF 3 "October 1, 2016"
.SH NAME
libpng \- Portable Network Graphics (PNG) Reference Library 1.6.25
libpng \- Portable Network Graphics (PNG) Reference Library 1.6.26beta02
(private functions)
.SH SYNOPSIS
\fB#include \fI"pngpriv.h"

View File

@@ -3,7 +3,7 @@
*
* Copyright (c) 2016 Glenn Randers-Pehrson
* Written by Mandar Sahastrabuddhe, August 2016.
* Last changed in libpng 1.6.25 [September 1, 2016]
* Last changed in libpng 1.6.25 [(PENDING RELEASE)]
*
* This code is released under the libpng license.
* For conditions of distribution and use, see the disclaimer

View File

@@ -3,7 +3,7 @@
*
* Copyright (c) 2016 Glenn Randers-Pehrson
* Written by Mandar Sahastrabuddhe, 2016.
* Last changed in libpng 1.6.25 [September 1, 2016]
* Last changed in libpng 1.6.25 [(PENDING RELEASE)]
*
* This code is released under the libpng license.
* For conditions of distribution and use, see the disclaimer

2
png.5
View File

@@ -1,4 +1,4 @@
.TH PNG 5 "September 1, 2016"
.TH PNG 5 "October 1, 2016"
.SH NAME
png \- Portable Network Graphics (PNG) format
.SH DESCRIPTION

8
png.c
View File

@@ -14,7 +14,7 @@
#include "pngpriv.h"
/* Generate a compiler error if there is an old png.h in the search path. */
typedef png_libpng_version_1_6_25 Your_png_h_is_not_version_1_6_25;
typedef png_libpng_version_1_6_26beta02 Your_png_h_is_not_version_1_6_26beta02;
/* Tells libpng that we have already handled the first "num_bytes" bytes
* of the PNG file signature. If the PNG data is embedded into another
@@ -775,14 +775,14 @@ png_get_copyright(png_const_structrp png_ptr)
#else
# ifdef __STDC__
return PNG_STRING_NEWLINE \
"libpng version 1.6.25 - September 1, 2016" PNG_STRING_NEWLINE \
"libpng version 1.6.26beta02 - October 1, 2016" PNG_STRING_NEWLINE \
"Copyright (c) 1998-2002,2004,2006-2016 Glenn Randers-Pehrson" \
PNG_STRING_NEWLINE \
"Copyright (c) 1996-1997 Andreas Dilger" PNG_STRING_NEWLINE \
"Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc." \
PNG_STRING_NEWLINE;
# else
return "libpng version 1.6.25 - September 1, 2016\
return "libpng version 1.6.26beta02 - October 1, 2016\
Copyright (c) 1998-2002,2004,2006-2016 Glenn Randers-Pehrson\
Copyright (c) 1996-1997 Andreas Dilger\
Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc.";
@@ -2529,7 +2529,7 @@ png_check_IHDR(png_const_structrp png_ptr,
error = 1;
}
if (png_gt(((width + 7) & (~7)),
if (png_gt(((width + 7) & (~7U)),
((PNG_SIZE_MAX
- 48 /* big_row_buf hack */
- 1) /* filter byte */

26
png.h
View File

@@ -1,7 +1,7 @@
/* png.h - header file for PNG reference library
*
* libpng version 1.6.25, September 1, 2016
* libpng version 1.6.26beta02, October 1, 2016
*
* Copyright (c) 1998-2002,2004,2006-2016 Glenn Randers-Pehrson
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
@@ -12,7 +12,7 @@
* Authors and maintainers:
* libpng versions 0.71, May 1995, through 0.88, January 1996: Guy Schalnat
* libpng versions 0.89, June 1996, through 0.96, May 1997: Andreas Dilger
* libpng versions 0.97, January 1998, through 1.6.25, September 1, 2016:
* libpng versions 0.97, January 1998, through 1.6.26beta02, October 1, 2016:
* Glenn Randers-Pehrson.
* See also "Contributing Authors", below.
*/
@@ -29,7 +29,7 @@
* files that are distributed with libpng have other copyright owners and
* are released under other open source licenses.
*
* libpng versions 1.0.7, July 1, 2000 through 1.6.25, September 1, 2016 are
* libpng versions 1.0.7, July 1, 2000 through 1.6.26beta02, October 1, 2016 are
* Copyright (c) 2000-2002, 2004, 2006-2016 Glenn Randers-Pehrson, are
* derived from libpng-1.0.6, and are distributed according to the same
* disclaimer and license as libpng-1.0.6 with the following individuals
@@ -218,7 +218,7 @@
* ...
* 1.5.27 15 10527 15.so.15.27[.0]
* ...
* 1.6.25 16 10625 16.so.16.25[.0]
* 1.6.26 16 10626 16.so.16.26[.0]
*
* Henceforth the source version will match the shared-library major
* and minor numbers; the shared-library major version number will be
@@ -246,13 +246,13 @@
* Y2K compliance in libpng:
* =========================
*
* September 1, 2016
* October 1, 2016
*
* Since the PNG Development group is an ad-hoc body, we can't make
* an official declaration.
*
* This is your unofficial assurance that libpng from version 0.71 and
* upward through 1.6.25 are Y2K compliant. It is my belief that
* upward through 1.6.26beta02 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
@@ -314,8 +314,8 @@
*/
/* Version information for png.h - this should match the version in png.c */
#define PNG_LIBPNG_VER_STRING "1.6.25"
#define PNG_HEADER_VERSION_STRING " libpng version 1.6.25 - September 1, 2016\n"
#define PNG_LIBPNG_VER_STRING "1.6.26beta02"
#define PNG_HEADER_VERSION_STRING " libpng version 1.6.26beta02 - October 1, 2016\n"
#define PNG_LIBPNG_VER_SONUM 16
#define PNG_LIBPNG_VER_DLLNUM 16
@@ -323,13 +323,13 @@
/* These should match the first 3 components of PNG_LIBPNG_VER_STRING: */
#define PNG_LIBPNG_VER_MAJOR 1
#define PNG_LIBPNG_VER_MINOR 6
#define PNG_LIBPNG_VER_RELEASE 25
#define PNG_LIBPNG_VER_RELEASE 26
/* This should match the numeric part of the final component of
* PNG_LIBPNG_VER_STRING, omitting any leading zero:
*/
#define PNG_LIBPNG_VER_BUILD 0
#define PNG_LIBPNG_VER_BUILD 02
/* Release Status */
#define PNG_LIBPNG_BUILD_ALPHA 1
@@ -346,7 +346,7 @@
#define PNG_LIBPNG_BUILD_SPECIAL 32 /* Cannot be OR'ed with
PNG_LIBPNG_BUILD_PRIVATE */
#define PNG_LIBPNG_BUILD_BASE_TYPE PNG_LIBPNG_BUILD_STABLE
#define PNG_LIBPNG_BUILD_BASE_TYPE PNG_LIBPNG_BUILD_BETA
/* Careful here. At one time, Guy wanted to use 082, but that would be octal.
* We must not include leading zeros.
@@ -354,7 +354,7 @@
* version 1.0.0 was mis-numbered 100 instead of 10000). From
* version 1.0.1 it's xxyyzz, where x=major, y=minor, z=release
*/
#define PNG_LIBPNG_VER 10625 /* 1.6.25 */
#define PNG_LIBPNG_VER 10626 /* 1.6.26 */
/* Library configuration: these options cannot be changed after
* the library has been built.
@@ -464,7 +464,7 @@ extern "C" {
/* This triggers a compiler error in png.c, if png.c and png.h
* do not agree upon the version number.
*/
typedef char* png_libpng_version_1_6_25;
typedef char* png_libpng_version_1_6_26beta02;
/* 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
*
* libpng version 1.6.25, September 1, 2016
* libpng version 1.6.26beta02, October 1, 2016
*
* Copyright (c) 1998-2002,2004,2006-2016 Glenn Randers-Pehrson
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)

View File

@@ -684,7 +684,12 @@ png_process_IDAT_data(png_structrp png_ptr, png_bytep buffer,
png_warning(png_ptr, "Truncated compressed data in IDAT");
else
png_error(png_ptr, "Decompression error in IDAT");
{
if (ret == Z_DATA_ERROR)
png_benign_error(png_ptr, "IDAT: ADLER32 checksum mismatch");
else
png_error(png_ptr, "Decompression error in IDAT");
}
/* Skip the check on unprocessed input */
return;

184
pngpriv.h
View File

@@ -1,7 +1,7 @@
/* pngpriv.h - private declarations for use inside libpng
*
* Last changed in libpng 1.6.25 [September 1, 2016]
* Last changed in libpng 1.6.26 [(PENDING RELEASE)]
* Copyright (c) 1998-2002,2004,2006-2016 Glenn Randers-Pehrson
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
@@ -550,92 +550,92 @@
* are defined in png.h because they need to be visible to applications
* that call png_set_unknown_chunk().
*/
/* #define PNG_HAVE_IHDR 0x01 (defined in png.h) */
/* #define PNG_HAVE_PLTE 0x02 (defined in png.h) */
#define PNG_HAVE_IDAT 0x04
/* #define PNG_AFTER_IDAT 0x08 (defined in png.h) */
#define PNG_HAVE_IEND 0x10
/* 0x20 (unused) */
/* 0x40 (unused) */
/* 0x80 (unused) */
#define PNG_HAVE_CHUNK_HEADER 0x100
#define PNG_WROTE_tIME 0x200
#define PNG_WROTE_INFO_BEFORE_PLTE 0x400
#define PNG_BACKGROUND_IS_GRAY 0x800
#define PNG_HAVE_PNG_SIGNATURE 0x1000
#define PNG_HAVE_CHUNK_AFTER_IDAT 0x2000 /* Have another chunk after IDAT */
/* 0x4000 (unused) */
#define PNG_IS_READ_STRUCT 0x8000 /* Else is a write struct */
/* #define PNG_HAVE_IHDR 0x01U (defined in png.h) */
/* #define PNG_HAVE_PLTE 0x02U (defined in png.h) */
#define PNG_HAVE_IDAT 0x04U
/* #define PNG_AFTER_IDAT 0x08U (defined in png.h) */
#define PNG_HAVE_IEND 0x10U
/* 0x20U (unused) */
/* 0x40U (unused) */
/* 0x80U (unused) */
#define PNG_HAVE_CHUNK_HEADER 0x100U
#define PNG_WROTE_tIME 0x200U
#define PNG_WROTE_INFO_BEFORE_PLTE 0x400U
#define PNG_BACKGROUND_IS_GRAY 0x800U
#define PNG_HAVE_PNG_SIGNATURE 0x1000U
#define PNG_HAVE_CHUNK_AFTER_IDAT 0x2000U /* Have another chunk after IDAT */
/* 0x4000U (unused) */
#define PNG_IS_READ_STRUCT 0x8000U /* Else is a write struct */
/* Flags for the transformations the PNG library does on the image data */
#define PNG_BGR 0x0001
#define PNG_INTERLACE 0x0002
#define PNG_PACK 0x0004
#define PNG_SHIFT 0x0008
#define PNG_SWAP_BYTES 0x0010
#define PNG_INVERT_MONO 0x0020
#define PNG_QUANTIZE 0x0040
#define PNG_COMPOSE 0x0080 /* Was PNG_BACKGROUND */
#define PNG_BACKGROUND_EXPAND 0x0100
#define PNG_EXPAND_16 0x0200 /* Added to libpng 1.5.2 */
#define PNG_16_TO_8 0x0400 /* Becomes 'chop' in 1.5.4 */
#define PNG_RGBA 0x0800
#define PNG_EXPAND 0x1000
#define PNG_GAMMA 0x2000
#define PNG_GRAY_TO_RGB 0x4000
#define PNG_FILLER 0x8000
#define PNG_PACKSWAP 0x10000
#define PNG_SWAP_ALPHA 0x20000
#define PNG_STRIP_ALPHA 0x40000
#define PNG_INVERT_ALPHA 0x80000
#define PNG_USER_TRANSFORM 0x100000
#define PNG_RGB_TO_GRAY_ERR 0x200000
#define PNG_RGB_TO_GRAY_WARN 0x400000
#define PNG_RGB_TO_GRAY 0x600000 /* two bits, RGB_TO_GRAY_ERR|WARN */
#define PNG_ENCODE_ALPHA 0x800000 /* Added to libpng-1.5.4 */
#define PNG_ADD_ALPHA 0x1000000 /* Added to libpng-1.2.7 */
#define PNG_EXPAND_tRNS 0x2000000 /* Added to libpng-1.2.9 */
#define PNG_SCALE_16_TO_8 0x4000000 /* Added to libpng-1.5.4 */
/* 0x8000000 unused */
/* 0x10000000 unused */
/* 0x20000000 unused */
/* 0x40000000 unused */
#define PNG_BGR 0x0001U
#define PNG_INTERLACE 0x0002U
#define PNG_PACK 0x0004U
#define PNG_SHIFT 0x0008U
#define PNG_SWAP_BYTES 0x0010U
#define PNG_INVERT_MONO 0x0020U
#define PNG_QUANTIZE 0x0040U
#define PNG_COMPOSE 0x0080U /* Was PNG_BACKGROUND */
#define PNG_BACKGROUND_EXPAND 0x0100U
#define PNG_EXPAND_16 0x0200U /* Added to libpng 1.5.2 */
#define PNG_16_TO_8 0x0400U /* Becomes 'chop' in 1.5.4 */
#define PNG_RGBA 0x0800U
#define PNG_EXPAND 0x1000U
#define PNG_GAMMA 0x2000U
#define PNG_GRAY_TO_RGB 0x4000U
#define PNG_FILLER 0x8000U
#define PNG_PACKSWAP 0x10000U
#define PNG_SWAP_ALPHA 0x20000U
#define PNG_STRIP_ALPHA 0x40000U
#define PNG_INVERT_ALPHA 0x80000U
#define PNG_USER_TRANSFORM 0x100000U
#define PNG_RGB_TO_GRAY_ERR 0x200000U
#define PNG_RGB_TO_GRAY_WARN 0x400000U
#define PNG_RGB_TO_GRAY 0x600000U /* two bits, RGB_TO_GRAY_ERR|WARN */
#define PNG_ENCODE_ALPHA 0x800000U /* Added to libpng-1.5.4 */
#define PNG_ADD_ALPHA 0x1000000U /* Added to libpng-1.2.7 */
#define PNG_EXPAND_tRNS 0x2000000U /* Added to libpng-1.2.9 */
#define PNG_SCALE_16_TO_8 0x4000000U /* Added to libpng-1.5.4 */
/* 0x8000000U unused */
/* 0x10000000U unused */
/* 0x20000000U unused */
/* 0x40000000U unused */
/* Flags for png_create_struct */
#define PNG_STRUCT_PNG 0x0001
#define PNG_STRUCT_INFO 0x0002
#define PNG_STRUCT_PNG 0x0001U
#define PNG_STRUCT_INFO 0x0002U
/* Flags for the png_ptr->flags rather than declaring a byte for each one */
#define PNG_FLAG_ZLIB_CUSTOM_STRATEGY 0x0001
#define PNG_FLAG_ZSTREAM_INITIALIZED 0x0002 /* Added to libpng-1.6.0 */
/* 0x0004 unused */
#define PNG_FLAG_ZSTREAM_ENDED 0x0008 /* Added to libpng-1.6.0 */
/* 0x0010 unused */
/* 0x0020 unused */
#define PNG_FLAG_ROW_INIT 0x0040
#define PNG_FLAG_FILLER_AFTER 0x0080
#define PNG_FLAG_CRC_ANCILLARY_USE 0x0100
#define PNG_FLAG_CRC_ANCILLARY_NOWARN 0x0200
#define PNG_FLAG_CRC_CRITICAL_USE 0x0400
#define PNG_FLAG_CRC_CRITICAL_IGNORE 0x0800
#define PNG_FLAG_ASSUME_sRGB 0x1000 /* Added to libpng-1.5.4 */
#define PNG_FLAG_OPTIMIZE_ALPHA 0x2000 /* Added to libpng-1.5.4 */
#define PNG_FLAG_DETECT_UNINITIALIZED 0x4000 /* Added to libpng-1.5.4 */
/* #define PNG_FLAG_KEEP_UNKNOWN_CHUNKS 0x8000 */
/* #define PNG_FLAG_KEEP_UNSAFE_CHUNKS 0x10000 */
#define PNG_FLAG_LIBRARY_MISMATCH 0x20000
#define PNG_FLAG_STRIP_ERROR_NUMBERS 0x40000
#define PNG_FLAG_STRIP_ERROR_TEXT 0x80000
#define PNG_FLAG_BENIGN_ERRORS_WARN 0x100000 /* Added to libpng-1.4.0 */
#define PNG_FLAG_APP_WARNINGS_WARN 0x200000 /* Added to libpng-1.6.0 */
#define PNG_FLAG_APP_ERRORS_WARN 0x400000 /* Added to libpng-1.6.0 */
/* 0x800000 unused */
/* 0x1000000 unused */
/* 0x2000000 unused */
/* 0x4000000 unused */
/* 0x8000000 unused */
/* 0x10000000 unused */
/* 0x20000000 unused */
/* 0x40000000 unused */
#define PNG_FLAG_ZLIB_CUSTOM_STRATEGY 0x0001U
#define PNG_FLAG_ZSTREAM_INITIALIZED 0x0002U /* Added to libpng-1.6.0 */
/* 0x0004U unused */
#define PNG_FLAG_ZSTREAM_ENDED 0x0008U /* Added to libpng-1.6.0 */
/* 0x0010U unused */
/* 0x0020U unused */
#define PNG_FLAG_ROW_INIT 0x0040U
#define PNG_FLAG_FILLER_AFTER 0x0080U
#define PNG_FLAG_CRC_ANCILLARY_USE 0x0100U
#define PNG_FLAG_CRC_ANCILLARY_NOWARN 0x0200U
#define PNG_FLAG_CRC_CRITICAL_USE 0x0400U
#define PNG_FLAG_CRC_CRITICAL_IGNORE 0x0800U
#define PNG_FLAG_ASSUME_sRGB 0x1000U /* Added to libpng-1.5.4 */
#define PNG_FLAG_OPTIMIZE_ALPHA 0x2000U /* Added to libpng-1.5.4 */
#define PNG_FLAG_DETECT_UNINITIALIZED 0x4000U /* Added to libpng-1.5.4 */
/* #define PNG_FLAG_KEEP_UNKNOWN_CHUNKS 0x8000U */
/* #define PNG_FLAG_KEEP_UNSAFE_CHUNKS 0x10000U */
#define PNG_FLAG_LIBRARY_MISMATCH 0x20000U
#define PNG_FLAG_STRIP_ERROR_NUMBERS 0x40000U
#define PNG_FLAG_STRIP_ERROR_TEXT 0x80000U
#define PNG_FLAG_BENIGN_ERRORS_WARN 0x100000U /* Added to libpng-1.4.0 */
#define PNG_FLAG_APP_WARNINGS_WARN 0x200000U /* Added to libpng-1.6.0 */
#define PNG_FLAG_APP_ERRORS_WARN 0x400000U /* Added to libpng-1.6.0 */
/* 0x800000U unused */
/* 0x1000000U unused */
/* 0x2000000U unused */
/* 0x4000000U unused */
/* 0x8000000U unused */
/* 0x10000000U unused */
/* 0x20000000U unused */
/* 0x40000000U unused */
#define PNG_FLAG_CRC_ANCILLARY_MASK (PNG_FLAG_CRC_ANCILLARY_USE | \
PNG_FLAG_CRC_ANCILLARY_NOWARN)
@@ -669,6 +669,24 @@
((png_size_t)(width) * (((png_size_t)(pixel_bits)) >> 3)) : \
(( ((png_size_t)(width) * ((png_size_t)(pixel_bits))) + 7) >> 3) )
/* This returns the number of trailing bits in the last byte of a row, 0 if the
* last byte is completely full of pixels. It is, in principle, (pixel_bits x
* width) % 8, but that would overflow for large 'width'. The second macro is
* the same except that it returns the number of unused bits in the last byte;
* (8-TRAILBITS), but 0 when TRAILBITS is 0.
*
* NOTE: these macros are intended to be self-evidently correct and never
* overflow on the assumption that pixel_bits is in the range 0..255. The
* arguments are evaluated only once and they can be signed (e.g. as a result of
* the integral promotions). The result of the expression always has type
* (png_uint_32), however the compiler always knows it is in the range 0..7.
*/
#define PNG_TRAILBITS(pixel_bits, width) \
(((pixel_bits) * ((width) % (png_uint_32)8)) % 8)
#define PNG_PADBITS(pixel_bits, width) \
((8 - PNG_TRAILBITS(pixel_bits, width)) % 8)
/* PNG_OUT_OF_RANGE returns true if value is outside the range
* ideal-delta..ideal+delta. Each argument is evaluated twice.
* "ideal" and "delta" should be constants, normally simple
@@ -1263,7 +1281,7 @@ PNG_INTERNAL_FUNCTION(void,png_read_finish_row,(png_structrp png_ptr),
/* Initialize the row buffers, etc. */
PNG_INTERNAL_FUNCTION(void,png_read_start_row,(png_structrp png_ptr),PNG_EMPTY);
#if PNG_ZLIB_VERNUM >= 0x1240
#if ZLIB_VERNUM >= 0x1240
PNG_INTERNAL_FUNCTION(int,png_zlib_inflate,(png_structrp png_ptr, int flush),
PNG_EMPTY);
# define PNG_INFLATE(pp, flush) png_zlib_inflate(pp, flush)

View File

@@ -1393,7 +1393,9 @@ png_image_read_header(png_voidp argument)
png_structrp png_ptr = image->opaque->png_ptr;
png_inforp info_ptr = image->opaque->info_ptr;
#ifdef PNG_BENIGN_ERRORS_SUPPORTED
png_set_benign_errors(png_ptr, 1/*warn*/);
#endif
png_read_info(png_ptr, info_ptr);
/* Do this the fast way; just read directly out of png_struct. */
@@ -1966,7 +1968,7 @@ make_gray_file_colormap(png_image_read_control *display)
for (i=0; i<256; ++i)
png_create_colormap_entry(display, i, i, i, i, 255, P_FILE);
return i;
return (int)i;
}
static int
@@ -1977,7 +1979,7 @@ make_gray_colormap(png_image_read_control *display)
for (i=0; i<256; ++i)
png_create_colormap_entry(display, i, i, i, i, 255, P_sRGB);
return i;
return (int)i;
}
#define PNG_GRAY_COLORMAP_ENTRIES 256
@@ -2031,7 +2033,7 @@ make_ga_colormap(png_image_read_control *display)
P_sRGB);
}
return i;
return (int)i;
}
#define PNG_GA_COLORMAP_ENTRIES 256
@@ -2056,7 +2058,7 @@ make_rgb_colormap(png_image_read_control *display)
}
}
return i;
return (int)i;
}
#define PNG_RGB_COLORMAP_ENTRIES 216
@@ -3229,7 +3231,7 @@ png_image_read_colormapped(png_voidp argument)
png_uint_32 y = image->height;
png_bytep row = png_voidcast(png_bytep, display->first_row);
while (y-- > 0)
for (; y > 0; --y)
{
png_read_row(png_ptr, row, NULL);
row += row_bytes;
@@ -4062,7 +4064,7 @@ png_image_read_direct(png_voidp argument)
png_uint_32 y = image->height;
png_bytep row = png_voidcast(png_bytep, display->first_row);
while (y-- > 0)
for (; y > 0; --y)
{
png_read_row(png_ptr, row, NULL);
row += row_bytes;

View File

@@ -1,7 +1,7 @@
/* pngrutil.c - utilities to read a PNG file
*
* Last changed in libpng 1.6.25 [September 1, 2016]
* Last changed in libpng 1.6.26 [(PENDING RELEASE)]
* Copyright (c) 1998-2002,2004,2006-2016 Glenn Randers-Pehrson
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
@@ -370,11 +370,10 @@ png_inflate_claim(png_structrp png_ptr, png_uint_32 owner)
*/
{
int ret; /* zlib return code */
#if PNG_ZLIB_VERNUM >= 0x1240
#if ZLIB_VERNUM >= 0x1240
int window_bits = 0;
# if defined(PNG_SET_OPTION_SUPPORTED) && defined(PNG_MAXIMUM_INFLATE_WINDOW)
int window_bits;
if (((png_ptr->options >> PNG_MAXIMUM_INFLATE_WINDOW) & 3) ==
PNG_OPTION_ON)
{
@@ -384,13 +383,11 @@ png_inflate_claim(png_structrp png_ptr, png_uint_32 owner)
else
{
window_bits = 0;
png_ptr->zstream_start = 1;
}
# else
# define window_bits 0
# endif
#endif
#endif /* ZLIB_VERNUM >= 0x1240 */
/* Set this for safety, just in case the previous owner left pointers to
* memory allocations.
@@ -402,25 +399,31 @@ png_inflate_claim(png_structrp png_ptr, png_uint_32 owner)
if ((png_ptr->flags & PNG_FLAG_ZSTREAM_INITIALIZED) != 0)
{
#if PNG_ZLIB_VERNUM < 0x1240
ret = inflateReset(&png_ptr->zstream);
#else
#if ZLIB_VERNUM >= 0x1240
ret = inflateReset2(&png_ptr->zstream, window_bits);
#else
ret = inflateReset(&png_ptr->zstream);
#endif
}
else
{
#if PNG_ZLIB_VERNUM < 0x1240
ret = inflateInit(&png_ptr->zstream);
#else
#if ZLIB_VERNUM >= 0x1240
ret = inflateInit2(&png_ptr->zstream, window_bits);
#else
ret = inflateInit(&png_ptr->zstream);
#endif
if (ret == Z_OK)
png_ptr->flags |= PNG_FLAG_ZSTREAM_INITIALIZED;
}
#if ZLIB_VERNUM >= 0x1240
/* Turn off validation of the ADLER32 checksum */
if ((png_ptr->flags & PNG_FLAG_CRC_CRITICAL_IGNORE) != 0)
ret = inflateReset2(&png_ptr->zstream, -window_bits);
#endif
if (ret == Z_OK)
png_ptr->zowner = owner;
@@ -435,7 +438,7 @@ png_inflate_claim(png_structrp png_ptr, png_uint_32 owner)
#endif
}
#if PNG_ZLIB_VERNUM >= 0x1240
#if ZLIB_VERNUM >= 0x1240
/* Handle the start of the inflate stream if we called inflateInit2(strm,0);
* in this case some zlib versions skip validation of the CINFO field and, in
* certain circumstances, libpng may end up displaying an invalid image, in
@@ -4101,7 +4104,15 @@ png_read_IDAT_data(png_structrp png_ptr, png_bytep output,
png_zstream_error(png_ptr, ret);
if (output != NULL)
png_chunk_error(png_ptr, png_ptr->zstream.msg);
{
if(!strncmp(png_ptr->zstream.msg,"incorrect data check",20))
{
png_chunk_benign_error(png_ptr, "ADLER32 checksum mismatch");
continue;
}
else
png_chunk_error(png_ptr, png_ptr->zstream.msg);
}
else /* checking */
{

View File

@@ -1,7 +1,7 @@
/* pngset.c - storage of image information into info struct
*
* Last changed in libpng 1.6.24 [August 4, 2016]
* Last changed in libpng 1.6.26 [(PENDING RELEASE)]
* Copyright (c) 1998-2016 Glenn Randers-Pehrson
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
@@ -283,17 +283,29 @@ png_set_pCAL(png_const_structrp png_ptr, png_inforp info_ptr,
/* Check that the type matches the specification. */
if (type < 0 || type > 3)
png_error(png_ptr, "Invalid pCAL equation type");
{
png_chunk_report(png_ptr, "Invalid pCAL equation type",
PNG_CHUNK_WRITE_ERROR);
return;
}
if (nparams < 0 || nparams > 255)
png_error(png_ptr, "Invalid pCAL parameter count");
{
png_chunk_report(png_ptr, "Invalid pCAL parameter count",
PNG_CHUNK_WRITE_ERROR);
return;
}
/* Validate params[nparams] */
for (i=0; i<nparams; ++i)
{
if (params[i] == NULL ||
!png_check_fp_string(params[i], strlen(params[i])))
png_error(png_ptr, "Invalid format for pCAL parameter");
{
png_chunk_report(png_ptr, "Invalid format for pCAL parameter",
PNG_CHUNK_WRITE_ERROR);
return;
}
}
info_ptr->pcal_purpose = png_voidcast(png_charp,
@@ -301,8 +313,8 @@ png_set_pCAL(png_const_structrp png_ptr, png_inforp info_ptr,
if (info_ptr->pcal_purpose == NULL)
{
png_warning(png_ptr, "Insufficient memory for pCAL purpose");
png_chunk_report(png_ptr, "Insufficient memory for pCAL purpose",
PNG_CHUNK_WRITE_ERROR);
return;
}

View File

@@ -263,7 +263,7 @@ struct png_struct_def
/* pixel depth used for the row buffers */
png_byte transformed_pixel_depth;
/* pixel depth after read/write transforms */
#if PNG_ZLIB_VERNUM >= 0x1240
#if ZLIB_VERNUM >= 0x1240
png_byte zstream_start; /* at start of an input zlib stream */
#endif /* Zlib >= 1.2.4 */
#if defined(PNG_READ_FILLER_SUPPORTED) || defined(PNG_WRITE_FILLER_SUPPORTED)

105
pngtest.c
View File

@@ -1,7 +1,7 @@
/* pngtest.c - a simple test program to test libpng
*
* Last changed in libpng 1.6.25 [September 1, 2016]
* Last changed in libpng 1.6.26 [(PENDING RELEASE)]
* Copyright (c) 1998-2002,2004,2006-2016 Glenn Randers-Pehrson
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
@@ -43,15 +43,6 @@
#include "png.h"
/* 1.6.1 added support for the configure test harness, which uses 77 to indicate
* a skipped test, in earlier versions we need to succeed on a skipped test, so:
*/
#if PNG_LIBPNG_VER >= 10601 && defined(HAVE_CONFIG_H)
# define SKIP 77
#else
# define SKIP 0
#endif
/* Known chunks that exist in pngtest.png must be supported or pngtest will fail
* simply as a result of re-ordering them. This may be fixed in 1.7
*
@@ -514,10 +505,10 @@ typedef struct memory_information
typedef memory_information *memory_infop;
static memory_infop pinformation = NULL;
static png_alloc_size_t current_allocation = 0;
static png_alloc_size_t maximum_allocation = 0;
static png_alloc_size_t total_allocation = 0;
static png_alloc_size_t num_allocations = 0;
static int current_allocation = 0;
static int maximum_allocation = 0;
static int total_allocation = 0;
static int num_allocations = 0;
png_voidp PNGCBAPI png_debug_malloc PNGARG((png_structp png_ptr,
png_alloc_size_t size));
@@ -604,10 +595,9 @@ png_debug_free(png_structp png_ptr, png_voidp ptr)
if (pinfo->pointer == ptr)
{
*ppinfo = pinfo->next;
if (current_allocation < pinfo->size)
current_allocation -= pinfo->size;
if (current_allocation < 0)
fprintf(STDERR, "Duplicate free of memory\n");
else
current_allocation -= pinfo->size;
/* We must free the list element too, but first kill
the memory that is to be freed. */
memset(ptr, 0x55, pinfo->size);
@@ -939,12 +929,6 @@ test_one_file(PNG_CONST char *inname, PNG_CONST char *outname)
read_user_chunk_callback);
#endif
#ifdef PNG_SET_USER_LIMITS_SUPPORTED
# ifdef CHUNK_LIMIT /* from the build, for testing */
png_set_chunk_malloc_max(read_ptr, CHUNK_LIMIT);
# endif /* CHUNK_LIMIT */
#endif
#ifdef PNG_SETJMP_SUPPORTED
pngtest_debug("Setting jmpbuf for read struct");
if (setjmp(png_jmpbuf(read_ptr)))
@@ -980,15 +964,16 @@ test_one_file(PNG_CONST char *inname, PNG_CONST char *outname)
#endif
#endif
#ifdef PNG_BENIGN_ERRORS_SUPPORTED
if (strict != 0)
{
/* Treat png_benign_error() as errors on read */
png_set_benign_errors(read_ptr, 0);
#ifdef PNG_WRITE_SUPPORTED
# ifdef PNG_WRITE_SUPPORTED
/* Treat them as errors on write */
png_set_benign_errors(write_ptr, 0);
#endif
# endif
/* if strict is not set, then app warnings and errors are treated as
* warnings in release builds, but not in unstable builds; this can be
@@ -1001,10 +986,15 @@ test_one_file(PNG_CONST char *inname, PNG_CONST char *outname)
/* Allow application (pngtest) errors and warnings to pass */
png_set_benign_errors(read_ptr, 1);
#ifdef PNG_WRITE_SUPPORTED
/* Turn off CRC and ADLER32 checking while reading */
png_set_crc_action(read_ptr, PNG_CRC_QUIET_USE, PNG_CRC_QUIET_USE);
# ifdef PNG_WRITE_SUPPORTED
png_set_benign_errors(write_ptr, 1);
#endif
# endif
}
#endif /* BENIGN_ERRORS */
pngtest_debug("Initializing input and output streams");
#ifdef PNG_STDIO_SUPPORTED
@@ -1402,6 +1392,11 @@ test_one_file(PNG_CONST char *inname, PNG_CONST char *outname)
png_write_info(write_ptr, write_info_ptr);
write_chunks(write_ptr, before_IDAT); /* after PLTE */
#ifdef PNG_COMPRESSION_COMPAT
/* Test the 'compatibility' setting here, if it is available. */
png_set_compression(write_ptr, PNG_COMPRESSION_COMPAT);
#endif
#endif
#ifdef SINGLE_ROWBUF_ALLOC
@@ -1883,7 +1878,7 @@ main(int argc, char *argv[])
{
int i;
#if defined(PNG_USER_MEM_SUPPORTED) && PNG_DEBUG
png_alloc_size_t allocation_now = current_allocation;
int allocation_now = current_allocation;
#endif
for (i=2; i<argc; ++i)
{
@@ -1916,15 +1911,15 @@ main(int argc, char *argv[])
}
#if defined(PNG_USER_MEM_SUPPORTED) && PNG_DEBUG
if (allocation_now != current_allocation)
fprintf(STDERR, "MEMORY ERROR: %lu bytes lost\n",
(unsigned long)(current_allocation - allocation_now));
fprintf(STDERR, "MEMORY ERROR: %d bytes lost\n",
current_allocation - allocation_now);
if (current_allocation != 0)
{
memory_infop pinfo = pinformation;
fprintf(STDERR, "MEMORY ERROR: %lu bytes still allocated\n",
(unsigned long)current_allocation);
fprintf(STDERR, "MEMORY ERROR: %d bytes still allocated\n",
current_allocation);
while (pinfo != NULL)
{
@@ -1937,14 +1932,14 @@ main(int argc, char *argv[])
#endif
}
#if defined(PNG_USER_MEM_SUPPORTED) && PNG_DEBUG
fprintf(STDERR, " Current memory allocation: %20lu bytes\n",
(unsigned long)current_allocation);
fprintf(STDERR, " Maximum memory allocation: %20lu bytes\n",
(unsigned long) maximum_allocation);
fprintf(STDERR, " Total memory allocation: %20lu bytes\n",
(unsigned long)total_allocation);
fprintf(STDERR, " Number of allocations: %20lu\n",
(unsigned long)num_allocations);
fprintf(STDERR, " Current memory allocation: %10d bytes\n",
current_allocation);
fprintf(STDERR, " Maximum memory allocation: %10d bytes\n",
maximum_allocation);
fprintf(STDERR, " Total memory allocation: %10d bytes\n",
total_allocation);
fprintf(STDERR, " Number of allocations: %10d\n",
num_allocations);
#endif
}
@@ -1955,7 +1950,7 @@ main(int argc, char *argv[])
{
int kerror;
#if defined(PNG_USER_MEM_SUPPORTED) && PNG_DEBUG
png_alloc_size_t allocation_now = current_allocation;
int allocation_now = current_allocation;
#endif
if (i == 1)
status_dots_requested = 1;
@@ -2005,15 +2000,15 @@ main(int argc, char *argv[])
}
#if defined(PNG_USER_MEM_SUPPORTED) && PNG_DEBUG
if (allocation_now != current_allocation)
fprintf(STDERR, "MEMORY ERROR: %lu bytes lost\n",
(unsigned long)(current_allocation - allocation_now));
fprintf(STDERR, "MEMORY ERROR: %d bytes lost\n",
current_allocation - allocation_now);
if (current_allocation != 0)
{
memory_infop pinfo = pinformation;
fprintf(STDERR, "MEMORY ERROR: %lu bytes still allocated\n",
(unsigned long)current_allocation);
fprintf(STDERR, "MEMORY ERROR: %d bytes still allocated\n",
current_allocation);
while (pinfo != NULL)
{
@@ -2025,14 +2020,14 @@ main(int argc, char *argv[])
#endif
}
#if defined(PNG_USER_MEM_SUPPORTED) && PNG_DEBUG
fprintf(STDERR, " Current memory allocation: %20lu bytes\n",
(unsigned long)current_allocation);
fprintf(STDERR, " Maximum memory allocation: %20lu bytes\n",
(unsigned long)maximum_allocation);
fprintf(STDERR, " Total memory allocation: %20lu bytes\n",
(unsigned long)total_allocation);
fprintf(STDERR, " Number of allocations: %20lu\n",
(unsigned long)num_allocations);
fprintf(STDERR, " Current memory allocation: %10d bytes\n",
current_allocation);
fprintf(STDERR, " Maximum memory allocation: %10d bytes\n",
maximum_allocation);
fprintf(STDERR, " Total memory allocation: %10d bytes\n",
total_allocation);
fprintf(STDERR, " Number of allocations: %10d\n",
num_allocations);
#endif
}
@@ -2083,9 +2078,9 @@ main(void)
fprintf(STDERR,
" test ignored because libpng was not built with read support\n");
/* And skip this test */
return SKIP;
return PNG_LIBPNG_VER < 10600 ? 0 : 77;
}
#endif
/* Generate a compiler error if there is an old png.h in the search path. */
typedef png_libpng_version_1_6_25 Your_png_h_is_not_version_1_6_25;
typedef png_libpng_version_1_6_26beta02 Your_png_h_is_not_version_1_6_26beta02;

View File

@@ -1,7 +1,7 @@
/* pngtrans.c - transforms the data in a row (used by both readers and writers)
*
* Last changed in libpng 1.6.24 [August 4, 2016]
* Last changed in libpng 1.6.26 [(PENDING RELEASE)]
* Copyright (c) 1998-2002,2004,2006-2016 Glenn Randers-Pehrson
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
@@ -693,7 +693,7 @@ png_do_check_palette_indexes(png_structrp png_ptr, png_row_infop row_info)
* and this calculation is used because it avoids warnings that other
* forms produced on either GCC or MSVC.
*/
int padding = (-row_info->pixel_depth * row_info->width) & 7;
int padding = PNG_PADBITS(row_info->pixel_depth, row_info->width);
png_bytep rp = png_ptr->row_buf + row_info->rowbytes;
switch (row_info->bit_depth)

View File

@@ -1554,7 +1554,7 @@ png_write_image_16bit(png_voidp argument)
*/
row_end = output_row + image->width * (channels+1);
while (y-- > 0)
for (; y > 0; --y)
{
png_const_uint_16p in_ptr = input_row;
png_uint_16p out_ptr = output_row;
@@ -1705,7 +1705,7 @@ png_write_image_8bit(png_voidp argument)
/* Use row_end in place of a loop counter: */
row_end = output_row + image->width * (channels+1);
while (y-- > 0)
for (; y > 0; --y)
{
png_const_uint_16p in_ptr = input_row;
png_bytep out_ptr = output_row;
@@ -1746,7 +1746,7 @@ png_write_image_8bit(png_voidp argument)
*/
png_bytep row_end = output_row + image->width * channels;
while (y-- > 0)
for (; y > 0; --y)
{
png_const_uint_16p in_ptr = input_row;
png_bytep out_ptr = output_row;
@@ -2136,7 +2136,7 @@ png_image_write_main(png_voidp argument)
ptrdiff_t row_bytes = display->row_bytes;
png_uint_32 y = image->height;
while (y-- > 0)
for (; y > 0; --y)
{
png_write_row(png_ptr, row);
row += row_bytes;

View File

@@ -408,7 +408,7 @@ png_deflate_claim(png_structrp png_ptr, png_uint_32 owner,
png_ptr->zstream.avail_out = 0;
/* Now initialize if required, setting the new parameters, otherwise just
* to a simple reset to the previous parameters.
* do a simple reset to the previous parameters.
*/
if ((png_ptr->flags & PNG_FLAG_ZSTREAM_INITIALIZED) != 0)
ret = deflateReset(&png_ptr->zstream);
@@ -2255,7 +2255,7 @@ png_setup_sub_row(png_structrp png_ptr, const png_uint_32 bpp,
png_bytep rp, dp, lp;
png_size_t i;
png_size_t sum = 0;
int v;
unsigned int v;
png_ptr->try_row[0] = PNG_FILTER_VALUE_SUB;
@@ -2316,7 +2316,7 @@ png_setup_up_row(png_structrp png_ptr, const png_size_t row_bytes,
png_bytep rp, dp, pp;
png_size_t i;
png_size_t sum = 0;
int v;
unsigned int v;
png_ptr->try_row[0] = PNG_FILTER_VALUE_UP;
@@ -2360,7 +2360,7 @@ png_setup_avg_row(png_structrp png_ptr, const png_uint_32 bpp,
png_bytep rp, dp, pp, lp;
png_uint_32 i;
png_size_t sum = 0;
int v;
unsigned int v;
png_ptr->try_row[0] = PNG_FILTER_VALUE_AVG;
@@ -2422,7 +2422,7 @@ png_setup_paeth_row(png_structrp png_ptr, const png_uint_32 bpp,
png_bytep rp, dp, pp, cp, lp;
png_size_t i;
png_size_t sum = 0;
int v;
unsigned int v;
png_ptr->try_row[0] = PNG_FILTER_VALUE_PAETH;
@@ -2588,7 +2588,7 @@ png_write_find_filter(png_structrp png_ptr, png_row_infop row_info)
png_bytep rp;
png_size_t sum = 0;
png_size_t i;
int v;
unsigned int v;
{
for (i = 0, rp = row_buf + 1; i < row_bytes; i++, rp++)

View File

@@ -1,7 +1,7 @@
VisualStudio instructions
libpng version 1.6.25 - September 1, 2016
libpng version 1.6.26beta02 - October 1, 2016
Copyright (c) 2010,2013,2015 Glenn Randers-Pehrson

View File

@@ -2,7 +2,7 @@
<!--
* zlib.props - location of zlib source
*
* libpng version 1.6.25 - September 1, 2016
* libpng version 1.6.26beta02 - October 1, 2016
*
* Copyright (c) 1998-2011 Glenn Randers-Pehrson
*

View File

@@ -1,9 +1,9 @@
Makefiles for libpng version 1.6.25 - September 1, 2016
Makefiles for libpng version 1.6.26beta02 - October 1, 2016
pnglibconf.h.prebuilt => Stores configuration settings
makefile.linux => Linux/ELF makefile
(gcc, creates libpng16.so.16.1.6.25)
(gcc, creates libpng16.so.16.1.6.26beta02)
makefile.gcc => Generic makefile (gcc, creates static libpng.a)
makefile.knr => Archaic UNIX Makefile that converts files with
ansi2knr (Requires ansi2knr.c from
@@ -33,12 +33,12 @@ pnglibconf.h.prebuilt => Stores configuration settings
makefile.os2 => OS/2 Makefile (gcc and emx, requires libpng.def)
makefile.sco => For SCO OSr5 ELF and Unixware 7 with Native cc
makefile.sggcc => Silicon Graphics (gcc,
creates libpng16.so.16.1.6.25)
creates libpng16.so.16.1.6.26beta02)
makefile.sgi => Silicon Graphics IRIX makefile (cc, creates static lib)
makefile.solaris => Solaris 2.X makefile (gcc,
creates libpng16.so.16.1.6.25)
creates libpng16.so.16.1.6.26beta02)
makefile.so9 => Solaris 9 makefile (gcc,
creates libpng16.so.16.1.6.25)
creates libpng16.so.16.1.6.26beta02)
makefile.std => Generic UNIX makefile (cc, creates static libpng.a)
makefile.sunos => Sun makefile
makefile.32sunu => Sun Ultra 32-bit makefile

View File

@@ -21,7 +21,7 @@ PNG_DFN "OS2 DESCRIPTION "PNG image compression library""
PNG_DFN "OS2 CODE PRELOAD MOVEABLE DISCARDABLE"
PNG_DFN ""
PNG_DFN "EXPORTS"
PNG_DFN ";Version 1.6.25"
PNG_DFN ";Version 1.6.26beta02"
#define PNG_EXPORTA(ordinal, type, name, args, attributes)\
PNG_DFN "@" SYMBOL_PREFIX "@@" name "@"

View File

@@ -11,7 +11,7 @@
# Modeled after libxml-config.
version=1.6.25
version=1.6.26beta02
prefix=""
libdir=""
libs=""

View File

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

View File

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

View File

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

View File

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

View File

@@ -17,7 +17,7 @@ INCSDIR=${LOCALBASE}/include/libpng16
LIB= png16
SHLIB_MAJOR= 0
SHLIB_MINOR= 1.6.25
SHLIB_MINOR= 1.6.26beta02
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

View File

@@ -17,7 +17,7 @@ INCSDIR=${LOCALBASE}/include
LIB= png
SHLIB_MAJOR= 16
SHLIB_MINOR= 1.6.25
SHLIB_MINOR= 1.6.26beta02
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

View File

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

View File

@@ -1,8 +1,8 @@
/* libpng 1.6.25 STANDARD API DEFINITION */
/* libpng 1.6.26beta02 STANDARD API DEFINITION */
/* pnglibconf.h - library build configuration */
/* Libpng version 1.6.25 - September 1, 2016 */
/* Libpng version 1.6.26beta02 - October 1, 2016 */
/* Copyright (c) 1998-2015 Glenn Randers-Pehrson */

View File

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

BIN
tests/badadler.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 67 B

BIN
tests/badcrc.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 67 B

View File

@@ -1,2 +1,4 @@
#!/bin/sh
./pngtest --relaxed ${srcdir}/tests/badcrc.png
./pngtest --relaxed ${srcdir}/tests/badadler.png
exec ./pngtest --strict ${srcdir}/pngtest.png