Commit Graph

504 Commits

Author SHA1 Message Date
Glenn Randers-Pehrson
53f22aed41 [libpng16] Document need to check for integer overflow when allocating a pixel
buffer for multiple rows in contrib/gregbook, contrib/pngminus, example.c, and
in the manual (suggested by Jaeseung Choi).
2017-04-22 15:21:58 -05:00
Viktor Szakats
b3ffdc5991 URL updates 2017-03-31 23:25:57 +00:00
Glenn Randers-Pehrson
03a6f3f9c9 [libpng16] Bump version to 1.6.30beta01 2017-03-16 10:40:01 -05:00
Glenn Randers-Pehrson
d42e88d5b3 [libpng16] Imported from libpng-1.6.29.tar 2017-03-16 07:26:33 -05:00
Glenn Randers-Pehrson
a8de1a70d1 [libpng16] Imported from libpng-1.6.29beta03.tar 2017-03-01 07:15:29 -06:00
Glenn Randers-Pehrson
b475d0593c [libpng16] Update credits and copyright information about powerpc-vsx code 2017-02-22 15:14:22 -06:00
Glenn Randers-Pehrson
7980c79d69 Merge branch 'libpng16' of git://github.com/barkovv/libpng into libpng16 2017-02-21 20:41:27 -06:00
John Bowler
7218761fe1 Fix right code in the wrong place.
The recovery stuff was in the wrong if branches; the comments were
correct.

Signed-off-by: John Bowler <jbowler@acm.org>
2017-02-21 15:15:48 -08:00
Vadim Barkov
8a242668fd Added warning with supported OSes list for VSX check 2017-02-01 14:26:02 +00:00
Vadim Barkov
b42e8bce3a Added PNG_UNUSED macro in contrib/powerpc/linux{_aux}.c 2017-02-01 14:03:57 +00:00
Vadim Barkov
b1be78460a Fixed mixed tabs and spaces in contrib/powerpc/linux_aux.c 2017-02-01 13:58:54 +00:00
Vadim Barkov
d57bed7838 Fixed mixed tabs and spacing and comments in contrib/powerpc/linux.c 2017-02-01 13:57:50 +00:00
Vadim Barkov
f2b829166d Removed commentary about contrib/powerpc/READM 2017-01-31 12:13:39 +00:00
Vadim Barkov
80041d15b2 Update contrib/powerpc/linux_aux.c header 2017-01-31 15:07:14 +03:00
Vadim Barkov
bea573d370 Added auxv-based VSX detection method for PowerPC and enabled it by default 2017-01-31 11:59:11 +00:00
Vadim Barkov
c47ddcf22b Merge branch 'libpng16' into libpng16 2017-01-30 18:44:09 +03:00
Vadim Barkov
ee5804fa14 Added PowerPC detection code for linux 2017-01-14 16:47:10 +03:00
Glenn Randers-Pehrson
dd24a6ca15 [libpng16] Imported from libpng-1.6.29beta01.tar 2017-01-12 10:02:56 -06:00
Glenn Randers-Pehrson
4c0740c8de [libpng16] Simplified conditional compilation in pngvalid.c, for AIX (Michael Felt). 2017-01-12 09:48:12 -06:00
Glenn Randers-Pehrson
bef76802de [libpng16] Moved SSE2 optimization code into the main libpng source directory.
Configure libpng with "configure --enable-intel-sse" or compile
libpng with "-DPNG_INTEL_SSE" in CPPFLAGS to enable it.  This patch was
previously applied to libpng-1.6.28rc03 but withdrawn to allow time for QA.
2017-01-05 18:09:33 -06:00
Glenn Randers-Pehrson
93b3476358 [libpng16] Imported from libpng-1.6.28rc03.tar 2017-01-03 22:25:10 -06:00
Glenn Randers-Pehrson
edef058e18 [libpng16] Moved SSE2 optimization code into the main libpng source directory.
Configure libpng with "configure --enable-intel-see" or compile
libpng with "-DPNG_INTEL_SSE" in CPPFLAGS to enable it.
2017-01-03 19:15:15 -06:00
Glenn Randers-Pehrson
a3b5edc934 [libpng16] Bump version to 1.6.27 2016-12-29 07:50:33 -06:00
Glenn Randers-Pehrson
61a9a054fd [libpng16] Imported from libpng-1.6.27rc01.tar 2016-12-27 08:24:22 -06:00
John Bowler
13a354f81e Remove 'defined' within macro
This removes the use of a macro containing the pre-processor 'defined'
operator.  It is unclear whether this is valid; a macro which
"generates" 'defined' is not permitted, but the use of the work
"generates" within the C90 standard seems to imply more than simple
substitution of an expression itself containing a well-formed defined
operation.

Signed-off-by: John Bowler <jbowler@acm.org>
2016-12-26 16:43:15 -08:00
Glenn Randers-Pehrson
0c440812db [libpng16] Imported from libpng-1.6.26.tar 2016-10-19 19:11:38 -05:00
Glenn Randers-Pehrson
436ce2c6e9 [libpng16] Bump version to 1.6.26rc02 2016-10-17 12:46:41 -05:00
Glenn Randers-Pehrson
f6497e03d1 i[lbpng16] Quieted (bogus?) clang warnings about "absolute value has no effect".
Fixed offsets in contrib/intel/intel_sse.patch
2016-10-02 20:07:22 -05:00
Glenn Randers-Pehrson
ad3318ddc8 [libpng16] Bump version to 1.6.26beta03 2016-10-01 19:44:42 -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
90ea4af4a1 [libpng16] Update CHANGES and ANNOUNCE 2016-09-01 17:28:08 -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
abd88841ef [libpng16] Imported from libpng-1.6.25rc05.tar 2016-08-30 11:15:49 -05:00
Glenn Randers-Pehrson
0a2d496d58 [libpng16] Imported from libpng-1.6.25rc03.tar 2016-08-29 16:10:33 -05:00
Mandar Sahastrabuddhe
ee5e39835c Added build support for MIPS MSA
Also added one msa optimized function: png_read_filter_row_up_msa

Signed-off-by: Mandar Sahastrabuddhe <Mandar.Sahastrabuddhe@imgtec.com>
2016-08-29 19:07:25 +05:30
Glenn Randers-Pehrson
4be85e1b37 [libpng16] Rebased contrib/intel/intel_sse.patch 2016-08-17 06:52:07 -05:00
Glenn Randers-Pehrson
b50d5cea2b [libpng16] Imported from libpng-1.6.24.tar 2016-08-03 21:32:26 -05:00
Glenn Randers-Pehrson
96db0fff50 [libpng16] Conditionally compile ARM_NEON headers in pngpriv.h
Updated contrib/intel/intel_sse.patch
2016-08-02 09:31:05 -05:00
Glenn Randers-Pehrson
2c0b7a8ff6 [libpng16] Conditionally compile SSE2 headers in contrib/intel/intel_sse.patch 2016-07-31 21:22:06 -05:00
Glenn Randers-Pehrson
0a5e99d7ee [libpng16] Rebased contrib/intel/intel_sse.patch 2016-07-24 19:39:43 -05:00
Glenn Randers-Pehrson
ee079481c9 [libpng16] Imported from libpng-1.6.24beta06.tar 2016-07-19 17:00:00 -05:00
Glenn Randers-Pehrson
34c783e2fe [libpng16] Fix permission on reindent; add license info to contrib/tools/chkfmt 2016-07-14 18:53:30 -05:00
Glenn Randers-Pehrson
82d0009885 [libpng16] Add PD license to new "reindent" tool; remove unused environment var
I didn't intend to distribute this but it leaked into the libpng16 source,
so here it is.
2016-07-14 17:40:37 -05:00
Glenn Randers-Pehrson
3c7c436303 [libpng16] Imported from libpng-1.6.24beta05.tar 2016-07-14 09:55:35 -05:00
Glenn Randers-Pehrson
9b14f5f85a [libpng16] Fix a bad indent in pngvalid.c 2016-07-13 17:21:31 -05:00
Glenn Randers-Pehrson
66f796e74c [libpng16] Imported from libpng-1.6.24beta03.tar 2016-07-04 09:55:12 -05:00
John Bowler
cfc19ff1b6 pngcp bug fixes
The fixed size buffer for the file name being processed could have a byte
written beyond the end; a bug where the test was updated without changing the
size of the buffer.  This commit reduces the buffer to the system maximum.

png_getrowbytes could, in theory, return 0; probably only if there is a bug in
libpng but the code now checks.

Signed-off-by: John Bowler <jbowler@acm.org>
2016-07-03 13:49:36 -07:00
Glenn Randers-Pehrson
11c88033d4 [libpng16] Added "Common linking failures" section to INSTALL 2016-07-02 14:29:29 -05:00
John Bowler
54feb0ad2a pngimage: correct #define checking
In libpng 1.7 pngimage needs to check PNG_WRITE_PNG_SUPPORTED (new in 1.7), not
PNG_WRITE_SUPPORTED because png_write_png can be disabled without disabling
PNG_WRITE_SUPPORTED.  Copied the approach from 1.6 pngcp.c (so this still works
in 1.6 as well.)
2016-07-02 08:03:09 -07:00