Commit Graph

1633 Commits

Author SHA1 Message Date
Glenn Randers-Pehrson
f2715a558a [libpng16] Revised example.c to put text strings in a temporary character array
instead of directly assigning string constants to png_textp members.
This avoids compiler warnings when -Wwrite-strings is enabled.
2012-03-15 19:52:03 -05:00
John Bowler
845ee6af72 [libpng16] Fixed a compiler warning under Cygwin (Windows-7, 32-bit system) 2012-03-10 21:05:19 -06:00
John Bowler
9ff37ea94f [libpng16] Fix an off-by-one error in the palette index checking function. 2012-03-10 20:03:06 -06:00
Glenn Randers-Pehrson
35f2e1768b [libpng16] In pngtest, treat benign errors as errors if "-strict" is present. 2012-03-10 19:42:03 -06:00
Glenn Randers-Pehrson
945cb1f9be [libpng16] Issue a png_benign_error() instead of png_warning() about bad
palette index.
2012-03-10 08:48:04 -06:00
Glenn Randers-Pehrson
71db131882 [libpng16] Bump version to 1.6.0beta18 2012-03-09 22:15:09 -06:00
Glenn Randers-Pehrson
bf7661f01b [libpng16] Imported from libpng-1.6.0beta17.tar 2012-03-09 22:15:01 -06:00
John Bowler
9066919600 [libpng16] If benign errors are disabled use maximum window on ancillary
inflate.  This works round a bug introduced in 1.5.4 where compressed ancillary
chunks could end up with a too-small windowBits value in the deflate
header.
2012-03-09 22:03:13 -06:00
John Bowler
1ffbe8c7c1 [libpng] Committed new contrib/libtests/makepng.c that was overlooked
in a recent patch.
2012-03-09 12:21:51 -06:00
Glenn Randers-Pehrson
8d0215928d [libpng16] Fixed manual assertion that all of our public macros begin with PNG_
Some such as PNGAPI begin with "PNG".
2012-03-09 12:18:18 -06:00
John Bowler
b5d0051dcb [libpng16] Deflate/inflate was reworked to move common zlib calls into single
functions [rw]util.c.  A new shared keyword check routine was also added
and the 'zbuf' is no longer allocated on progressive read.  It is now
possible to call png_inflate() incrementally.
2012-03-09 09:15:18 -06:00
Glenn Randers-Pehrson
6038b80277 [libpng16] Reject iCCP chunk after the first, even if the first one is invalid. 2012-03-08 10:40:07 -06:00
Glenn Randers-Pehrson
b57c1c9e6e [libpng16] Bump version to 1.6.0beta17 2012-03-05 21:35:40 -06:00
Glenn Randers-Pehrson
0c98cc7023 [libpng16] Imported from libpng-1.6.0beta16.tar 2012-03-05 21:28:03 -06:00
John Bowler
6225b0e61e [libpng16] Added code to validate the windowBits value passed to deflateInit2().
If the call to deflateInit2() is wrong a png_warning will be issued
(in fact this is harmless, but the PNG data produced may be sub-optimal).
2012-03-05 21:26:57 -06:00
John Bowler
d072048925 [libpng16] Correct pngvalid error message 2012-03-05 21:10:11 -06:00
John Bowler
7d4fbb2fbb [libpng16] Validate the zTXt strings in pngvalid. 2012-03-05 21:02:49 -06:00
John Bowler
42a2b556e9 [libpng16] Made read 'inflate' handling like write 'deflate' handling. The
read code now claims and releases png_ptr->zstream, like the write code.
The bug whereby the progressive reader failed to release the zstream
is now fixed, all initialization is delayed, and the code checks for
changed parameters on deflate rather than always calling
deflatedEnd/deflateInit.
2012-03-05 20:57:40 -06:00
John Bowler
e2ae0f2f2b [libpng16] Fix tarith argument parsing 2012-03-05 20:43:27 -06:00
John Bowler
d6cf3a3791 [libpng16] Added a print out of the maximum observed error to 'tarith ascii' 2012-03-05 20:41:19 -06:00
John Bowler
e741cd592e [libpng16] Added contrib/libtests/tarith.c to test internal arithmetic
functions from png.c. This is a libpng maintainer program used to validate
changes to the internal arithmetic functions.
2012-03-04 20:48:57 -06:00
John Bowler
0ae4f7b705 [libpng16] Changed png_inflate() and calling routines to avoid overflow
problems.  This is an intermediate check-in that solves the immediate problems
and introduces one performance improvement (avoiding a copy via png_ptr->zbuf.)
Further changes will be made to make ICC profile handling more secure.
2012-03-03 21:10:26 -06:00
John Bowler
29a6ba01a7 [libpng16] Fixed build warnings (MSVC, GCC, GCC v3). Cygwin GCC with default
options declares 'index' as a global, causing a warning if it is used as a
local variable.  GCC 64-bit warns about assigning a (size_t) (unsigned 64-bit)
to an (int) (signed 32-bit).  MSVC, however, warns about using the
unary '-' operator on an unsigned value (even though it is well defined
by ANSI-C to be ~x+1).  The padding calculation was changed to use a
different method.  Removed the tests on png_ptr->pass.
2012-03-03 20:49:03 -06:00
Glenn Randers-Pehrson
434801a39c [libpng16] Bump version to 1.6.0beta16 2012-03-02 22:52:13 -06:00
Glenn Randers-Pehrson
79a141876a [libpng16] Revised scripts/pnglibconf.dfa 2012-03-02 22:50:03 -06:00
Glenn Randers-Pehrson
eeb1bb678d [libng16] Added palette-index checking while writing.
Relocated palette-index checking function from pngrutil.c to pngtrans.c
2012-03-02 22:10:15 -06:00
Glenn Randers-Pehrson
8e92cd51c6 [libpng16] Bump version to 1.6.0beta16 2012-03-02 14:04:36 -06:00
Glenn Randers-Pehrson
363387c9c0 [libpng16] Imported from libpng-1.6.0beta15.tar 2012-03-02 13:45:00 -06:00
John Bowler
6f237b6bf0 [libpng16] Remove whitespace at end of lines 2012-03-02 13:20:52 -06:00
John Bowler
a0ddf0b5f2 [libpng16] Minor update to pngstest.c, chmod 755 gentests.sh 2012-03-02 06:56:33 -06:00
Glenn Randers-Pehrson
5541ea8aaf [libpng16] Relocated declarations of index and padding in new index-checking
code.
2012-03-01 22:18:09 -06:00
John Bowler
cf49919686 [libpng16] Fixed some bugs in ICC profile writing. The code should now accept
all potentially valid ICC profiles and reject obviously invalid ones.
It now uses png_error() to do so rather than casually writing a PNG
without the necessary color data.
2012-03-01 21:54:07 -06:00
Glenn Randers-Pehrson
363ae65e2b [libpng16] Added tests for invalid palette index while reading and writing
(work in progress, the latter isn't finished).
2012-03-01 21:39:29 -06:00
John Bowler
cb129a6234 [libpng16] Improved pngstest fine tuning of error numbers, new test file
generator.  The generator generates images that test the full range of sample
values, allow the error numbers in pngstest to be tuned and checked.  makepng
also allows generation of images with extra chunks, although this is
still work-in-progress.
2012-03-01 21:26:54 -06:00
John Bowler
dee7577330 [libpng16] Added PNG_IMAGE_FLAG_FAST for the benefit of applications that
store intermediate files, or intermediate in-memory data, while processing
image data with the simplified API.  The option makes the files larger
but faster to write and read.  pngstest now uses this by default; this
can be disabled with the --slow option.
2012-03-01 18:55:54 -06:00
John Bowler
1c25b9b06b [libpng16] Fixed transparent pixel and 16-bit rgb tests in pngstest and removed
a spurious check in pngwrite.c
2012-02-29 10:49:28 -06:00
John Bowler
0a92b23c4b [libpng16] Rewrote pngstest.c for substantial speed improvement. 2012-02-29 06:47:55 -06:00
Glenn Randers-Pehrson
5408b613f8 [libpng16] Removed unused "current_text" members of png_struct
and the png_free() of png_ptr->current_text from pngread.c
2012-02-27 08:09:42 -06:00
Glenn Randers-Pehrson
b7e32059d3 [libpng16] Bump version to 1.6.0beta15 2012-02-26 21:38:19 -06:00
Glenn Randers-Pehrson
faf38eea03 [libpng16] Imported from libpng-1.6.0beta14.tar 2012-02-26 21:38:09 -06:00
Glenn Randers-Pehrson
9eb125e927 [libpng16] Updated Makefile.in
Added information about the new limits in the manual.
2012-02-24 22:04:53 -06:00
Glenn Randers-Pehrson
203e6dd7cf [libpng16] Checked in new Makefile.am that maintains pngusr.dfa 2012-02-24 15:56:01 -06:00
Glenn Randers-Pehrson
16bb03b8b4 [libpng16] Bump version to 1.6.0beta14 2012-02-24 11:52:56 -06:00
Glenn Randers-Pehrson
df44c4c4d9 [libpng16] Imported from libpng-1.6.0beta13.tar 2012-02-24 11:45:34 -06:00
Glenn Randers-Pehrson
4690b89eaa [libpng16] Added PNG_SAFE_LIMITS feature to pnglibconf.dfa, pngpriv.h, and new pngusr.dfa
to reset the user limits to safe ones if PNG_SAFE_LIMITS is defined.
To enable, use CPPFLAGS=-DPNG_SAFE_LIMITS on the configure command
or put #define PNG_SAFE_LIMITS_SUPPORTED in pnglibconf.h.prebuilt.
(Reverted previous implementation of PNG_SECURE.)
2012-02-24 11:43:31 -06:00
Glenn Randers-Pehrson
10c0693210 [libpng16] Added PNG_SECURE feature to pnglibconf.dfa and new pngusr.dfa file
to reset the user limits to safe ones if PNG_SECURE is defined.
2012-02-23 18:41:13 -06:00
Glenn Randers-Pehrson
17ba5de88f [libpng16] Eliminated redundant png_push_read_tEXt|zTXt|iTXt|unknown code from
pngpread.c and use the sequential png_handle_tEXt, etc., in pngrutil.c;
    now that png_ptr->buffer is inaccessible to applications, the special
    handling is no longer useful.
2012-02-21 14:49:56 -06:00
Glenn Randers-Pehrson
7d5bf79d88 [libpng16] Bump version to 1.6.0beta13 2012-02-18 22:54:56 -06:00
Glenn Randers-Pehrson
a4badc4b50 [libpng16] Imported from libpng-1.6.0beta12.tar 2012-02-17 17:07:54 -06:00
Glenn Randers-Pehrson
b0606ea043 [libpng16] Increase num_palette to invalid_index + 1, not to invalid_index. 2012-02-16 20:48:28 -06:00