Commit Graph

607 Commits

Author SHA1 Message Date
Glenn Randers-Pehrson
9050c32365 [libpng16] Remove one remaining "png_handler." from contrib/oss-fuzz/*.cc 2017-09-04 16:52:46 -05:00
Glenn Randers-Pehrson
c77de19ba9 [libpng16] Revise contrib/oss-fuzz/libpng_read_fuzzer.cc 2017-09-04 08:22:39 -05:00
Glenn Randers-Pehrson
c2c8b398a9 [libpng16] Imported from libpng-1.6.33beta02.tar 2017-09-02 19:48:19 -05:00
Glenn Randers-Pehrson
62a2463211 [lbipng16] Use current date (DATE) instead of release-date (RDATE) in last
changed date of contrib/oss-fuzz files.
2017-09-02 17:17:55 -05:00
Glenn Randers-Pehrson
dcd3edaf87 [libpng16] Restored part of ~PngObjectHandler() that was deleted from
contrib/oss-fuzz/libpng_read_fuzzer.cc
2017-09-02 16:13:15 -05:00
Glenn Randers-Pehrson
84a5bf83ff [libpng16] Nullify all pointers in PNG_CLEANUP of libpng_read_fuzzer.cc 2017-08-31 16:46:15 -05:00
Glenn Randers-Pehrson
f3a22d396a [libpng16] Trivial reordering of libpng_read_fuzzer.cc 2017-08-31 15:01:25 -05:00
Glenn Randers-Pehrson
47aa798127 [libpng16] Cosmetic changes to contrib/oss-fuzz/libpng_read_fuzzer.cc 2017-08-30 13:11:16 -05:00
Glenn Randers-Pehrson
5c27e93f51 [libpng16] Bump version to 1.6.33beta02 2017-08-30 07:03:12 -05:00
Glenn Randers-Pehrson
efaf42e5df [libpng16] Initialize png_handler.row_ptr in
contrib/oss-fuzz/libpng_read_fuzzer.cc
2017-08-30 06:47:55 -05:00
Glenn Randers-Pehrson
d3220babe2 [libpng16] Revised contrib/oss-fuzz/libpng_read_fuzzer.cc 2017-08-29 19:36:49 -05:00
Glenn Randers-Pehrson
58720d3c06 [libpng16] Fix "last changed" dates 2017-08-29 12:29:03 -05:00
Glenn Randers-Pehrson
50d2d49220 [libpng16] Imported from libpng-1.6.33beta01.tar 2017-08-28 18:34:23 -05:00
Glenn Randers-Pehrson
321c24b0d7 [libpng16] Bump version to 1.6.33beta01 2017-08-28 11:30:44 -05:00
Christian Hesse
14a8996fe6 [libpng] Updated PNGMINUS_UNUSED macro and comments in contrib/pngminus/p*.c 2017-08-28 11:28:18 -05:00
Glenn Randers-Pehrson
ef76b1f688 [libpng16] Free row_ptr in contrib/oss-fuzz/libpng_read_fuzzer.cc PNG_CLEANUP
to fix google/oss-fuzz issue 3193.
2017-08-28 11:07:10 -05:00
Glenn Randers-Pehrson
5c616548a0 [libpng16] Added PNGMINUS_UNUSED macro to contrib/pngminus/p*.c and added
missing parenthesis in contrib/pngminus/pnm2png.c (bug report by Christian
Hesse).
2017-08-28 07:13:22 -05:00
Glenn Randers-Pehrson
da923d334d [libpng16] Add calls to png_read_update_info() and png_read_end()
to contrib/oss-fuzz/libpng_read_fuzzer.cc, trying to increase coverage.
2017-08-26 20:39:50 -05:00
Glenn Randers-Pehrson
e06ec26906 [libpng16] Revise contrib/oss-fuzz/build.sh links to other oss-fuzz files 2017-08-25 18:56:37 -05:00
Glenn Randers-Pehrson
f6ca33d42c [libpng16] Bump version to 1.6.33beta01 2017-08-25 18:54:30 -05:00
Glenn Randers-Pehrson
df7e9dae0c [libpng16] Imported from libpng-1.6.32.tar 2017-08-24 16:39:02 -05:00
Glenn Randers-Pehrson
4760bac13d [libpng16] Removed mention of the .yaml file in the oss-fuzz README.txt 2017-08-23 21:09:59 -05:00
Glenn Randers-Pehrson
737f347f23 [libpng16] Removed contrib/-ss-fuzz/project.yaml which belongs in
google/oss-fuzz/projects/libpng
2017-08-23 21:02:57 -05:00
Glenn Randers-Pehrson
1257369169 [libpng16] Bump version to 1.6.32rc03 2017-08-22 20:06:04 -05:00
Glenn Randers-Pehrson
de315dfaad [libpng16] Imported from libpng-1.6.32rc02.tar 2017-08-22 16:31:50 -05:00
Glenn Randers-Pehrson
b0d14c7d13 'libpng16] Imported more files into the contrib/oss-fuzz directory 2017-08-22 13:58:59 -05:00
Glenn Randers-Pehrson
735fde494a [lbpng16] Clarified licensing info in contrib/oss-fuzz/* 2017-08-21 20:34:26 -05:00
Glenn Randers-Pehrson
d2533b96f3 [libpng16] Use png_handler.png_ptr instead of read_ptr in png_set_options(() 2017-08-21 20:19:43 -05:00
Glenn Randers-Pehrson
ddabd0c70a [libpng16] Added contrib/oss-fuzz directory 2017-08-21 19:14:39 -05:00
Glenn Randers-Pehrson
945759162e [libpng16] Imported from libpng-1.6.32rc01.tar 2017-08-18 20:01:11 -05:00
Glenn Randers-Pehrson
bcb739a864 [libpng16]Fix several "{" that were written in a different coding style;
update version number and copyright year
2017-08-11 10:14:33 -05:00
Glenn Randers-Pehrson
d19e8b9a4b [libpng16] Renamed chunks in contrib/testpngs/crashers to avoid having files
whose names differ only in case; this causes problems with some platforms
(github issue #172).
2017-08-11 06:39:26 -05:00
Glenn Randers-Pehrson
c5f801c82b [libpng16] Fix typo 2017-08-07 14:35:06 -05:00
Glenn Randers-Pehrson
646fad9d55 [libpng16] Check for 0 return from png_get_rowbytes() in contrib/pngminus/*.c
to stop some Coverity issues (162705, 162706, and 162707).
2017-08-07 14:22:56 -05:00
Glenn Randers-Pehrson
06ec4252a4 [libpng16] Made the huge_*_chunk.png files smaller. I could have removed the
IEND chunks, too, but although no application will read them, they give humans
something to look at.
2017-08-07 13:15:31 -05:00
Glenn Randers-Pehrson
33848546a3 [libpng16] Added contrib/testpngs/crashers/huge-XXXX-chunk.png 2017-08-07 12:27:07 -05:00
Glenn Randers-Pehrson
fa2f72258a [libpng16] Imported from libpng-1.6.32beta11.tar 2017-08-07 09:44:32 -05:00
Glenn Randers-Pehrson
7653aaa4b1 [libpng16] Rename bad_iccp.png, huge_idat.png to bad_iCCP.png, huge_iDAT.png
in the contrib/testpngs/crashers directory.
2017-08-07 07:34:02 -05:00
Glenn Randers-Pehrson
c339da7fc2 [libpng16] Removed JuNK and JuNk chunks from empty_ancillary_chunks.png test file. 2017-08-06 10:52:01 -05:00
Glenn Randers-Pehrson
c33d624988 [libpng] Added huge_IDAT.png and empty_ancillary_chunks.png to testpngs/crashers
Make pngtest --strict, --relax, --xfail options imply -m (multiple).
2017-08-05 11:01:18 -05:00
Glenn Randers-Pehrson
378e926d78 [libpng16] Added contrib/testpngs/crashers/bad_iccp.png 2017-08-04 19:29:23 -05:00
Glenn Randers-Pehrson
207392821d [libpng16] Moved bad pngs from tests to contrib/libtests/crashers
Moved testing of bad pngs into a separate tests/pngtest-badpngs script
Added the --xfail (expected FAIL) option to pngtest.c. It writes XFAIL
    in the output but PASS for the libpng test.
2017-08-04 14:17:28 -05:00
Glenn Randers-Pehrson
bc68c41d5f [libpng16] Initialized btoa[] in pngstest.c; stop memory leak in png_handle_eXIf()
when returning with an error.
2017-08-01 15:24:21 -05:00
Glenn Randers-Pehrson
68a80b10fe [libpng16] updated tests/pngunknown-sAPI; it works now. 2017-07-31 20:22:08 -05:00
Glenn Randers-Pehrson
c17b7b38b0 [libpng16] Updated contrib/libtests/pngunknown.c with eXIf chunk. Note:
the unknown-sAPI test is failing.
2017-07-31 19:04:15 -05:00
Glenn Randers-Pehrson
9fcb846402 [libpng16] Imported from libpng-1.6.31.tar 2017-07-27 05:27:17 -05:00
John Bowler
72d07d3202 [libpng16] Removed one of the GCC-7.1.0 'strict-overflow' warnings that
result when integers appear on both sides of a compare.  Worked around the
  others by forcing the strict-overflow setting in the relevant functions to
  a level where they are not reported.
Changed "FALL THROUGH" comments to "FALLTHROUGH" because GCC doesn't like
  the space.
Worked around some C-style casts from (void*) because g++ 5.4.0 objects
  to them.
Increased the buffer size for 'sprint' to pass the gcc 7.1.0 'sprint
  overflow' check that is on by default with -Wall -Wextra.
2017-07-11 08:47:05 -05:00
Glenn Randers-Pehrson
9f7134c3fc [libpng16] Update some "last changed" dates 2017-06-29 17:52:18 -05:00
Viktor Szakats
95f3c07d6f use HTTPS for zlib.net 2017-05-27 13:54:30 +00:00
Glenn Randers-Pehrson
8359b90057 [libpng16] Fix typo recently introduced in rpng-win.c 2017-04-24 15:48:45 -05:00
Glenn Randers-Pehrson
11c25c0e9e [libng16] Update copyright notices in revised "contrib" files. 2017-04-23 18:48:32 -05:00
Glenn Randers-Pehrson
b99308a33c [libpng16] Check for integer overflow in contrib/tools/genpng. 2017-04-23 18:41:28 -05:00
Glenn Randers-Pehrson
170a44b222 [libpng16] Check for integer overflow in contrib/visupng. 2017-04-23 17:33:10 -05:00
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