mirror of
https://git.code.sf.net/p/libpng/code.git
synced 2025-07-10 18:04:09 +02:00
[libng15] Issue a png_benign_error() instead of png_warning() about bad palette
index.
This commit is contained in:
parent
0ff5150f91
commit
1ca16d92f2
4
ANNOUNCE
4
ANNOUNCE
@ -48,7 +48,8 @@ Version 1.5.10beta02 [February 27, 2012]
|
|||||||
Version 1.5.10beta03 [March 6, 2012]
|
Version 1.5.10beta03 [March 6, 2012]
|
||||||
Removed unused "current_text" members of png_struct and the png_free()
|
Removed unused "current_text" members of png_struct and the png_free()
|
||||||
of png_ptr->current_text from pngread.c
|
of png_ptr->current_text from pngread.c
|
||||||
Added palette-index checking.
|
Added palette-index checking. Issue a png_warning() if an invalid index is
|
||||||
|
found.
|
||||||
|
|
||||||
Version 1.5.10beta04 [March 10, 2012]
|
Version 1.5.10beta04 [March 10, 2012]
|
||||||
Fixed PNG_LIBPNG_BUILD_BASE_TYPE definition.
|
Fixed PNG_LIBPNG_BUILD_BASE_TYPE definition.
|
||||||
@ -57,6 +58,7 @@ Version 1.5.10beta04 [March 10, 2012]
|
|||||||
|
|
||||||
Version 1.5.10beta05 [March 10, 2012]
|
Version 1.5.10beta05 [March 10, 2012]
|
||||||
Reject all iCCP chunks after the first, even if the first one is invalid.
|
Reject all iCCP chunks after the first, even if the first one is invalid.
|
||||||
|
Issue a png_benign_error() instead of png_warning() about bad palette index.
|
||||||
|
|
||||||
Send comments/corrections/commendations to png-mng-implement at lists.sf.net:
|
Send comments/corrections/commendations to png-mng-implement at lists.sf.net:
|
||||||
(subscription required; visit
|
(subscription required; visit
|
||||||
|
4
CHANGES
4
CHANGES
@ -3833,7 +3833,8 @@ Version 1.5.10beta02 [February 27, 2012]
|
|||||||
Version 1.5.10beta03 [March 6, 2012]
|
Version 1.5.10beta03 [March 6, 2012]
|
||||||
Removed unused "current_text" members of png_struct and the png_free()
|
Removed unused "current_text" members of png_struct and the png_free()
|
||||||
of png_ptr->current_text from pngread.c
|
of png_ptr->current_text from pngread.c
|
||||||
Added palette-index checking.
|
Added palette-index checking. Issue a png_warning() if an invalid index is
|
||||||
|
found.
|
||||||
|
|
||||||
Version 1.5.10beta04 [March 10, 2012]
|
Version 1.5.10beta04 [March 10, 2012]
|
||||||
Fixed PNG_LIBPNG_BUILD_BASE_TYPE definition.
|
Fixed PNG_LIBPNG_BUILD_BASE_TYPE definition.
|
||||||
@ -3842,6 +3843,7 @@ Version 1.5.10beta04 [March 10, 2012]
|
|||||||
|
|
||||||
Version 1.5.10beta05 [March 10, 2012]
|
Version 1.5.10beta05 [March 10, 2012]
|
||||||
Reject all iCCP chunks after the first, even if the first one is invalid.
|
Reject all iCCP chunks after the first, even if the first one is invalid.
|
||||||
|
Issue a png_benign_error() instead of png_warning() about bad palette index.
|
||||||
|
|
||||||
Send comments/corrections/commendations to png-mng-implement at lists.sf.net
|
Send comments/corrections/commendations to png-mng-implement at lists.sf.net
|
||||||
(subscription required; visit
|
(subscription required; visit
|
||||||
|
@ -4143,7 +4143,8 @@ From libpng-1.4.0 until 1.4.4, the png_get_uint_16 macro (but not the
|
|||||||
function) incorrectly returned a value of type png_uint_32.
|
function) incorrectly returned a value of type png_uint_32.
|
||||||
|
|
||||||
Checking for invalid palette index on read or write was added at libpng
|
Checking for invalid palette index on read or write was added at libpng
|
||||||
1.5.10. This is enabled by default but can be disabled in each png_ptr with
|
1.5.10. When an invalid index is found, libpng issues a benign error.
|
||||||
|
This is enabled by default but can be disabled in each png_ptr with
|
||||||
|
|
||||||
png_set_check_for_invalid_index(png_ptr, allowed);
|
png_set_check_for_invalid_index(png_ptr, allowed);
|
||||||
|
|
||||||
|
3
libpng.3
3
libpng.3
@ -5125,7 +5125,8 @@ From libpng-1.4.0 until 1.4.4, the png_get_uint_16 macro (but not the
|
|||||||
function) incorrectly returned a value of type png_uint_32.
|
function) incorrectly returned a value of type png_uint_32.
|
||||||
|
|
||||||
Checking for invalid palette index on read or write was added at libpng
|
Checking for invalid palette index on read or write was added at libpng
|
||||||
1.5.10. This is enabled by default but can be disabled in each png_ptr with
|
1.5.10. When an invalid index is found, libpng issues a benign error.
|
||||||
|
This is enabled by default but can be disabled in each png_ptr with
|
||||||
|
|
||||||
png_set_check_for_invalid_index(png_ptr, allowed);
|
png_set_check_for_invalid_index(png_ptr, allowed);
|
||||||
|
|
||||||
|
@ -805,7 +805,7 @@ png_read_end(png_structp png_ptr, png_infop info_ptr)
|
|||||||
/* Report invalid palette index; added at libng-1.5.10 */
|
/* Report invalid palette index; added at libng-1.5.10 */
|
||||||
if (png_ptr->color_type == PNG_COLOR_TYPE_PALETTE &&
|
if (png_ptr->color_type == PNG_COLOR_TYPE_PALETTE &&
|
||||||
png_ptr->num_palette_max > png_ptr->num_palette)
|
png_ptr->num_palette_max > png_ptr->num_palette)
|
||||||
png_warning(png_ptr, "Read palette index exceeding num_palette");
|
png_benign_error(png_ptr, "Read palette index exceeding num_palette");
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
do
|
do
|
||||||
|
@ -307,7 +307,7 @@ png_write_end(png_structp png_ptr, png_infop info_ptr)
|
|||||||
|
|
||||||
#ifdef PNG_WRITE_CHECK_FOR_INVALID_INDEX_SUPPORTED
|
#ifdef PNG_WRITE_CHECK_FOR_INVALID_INDEX_SUPPORTED
|
||||||
if (png_ptr->num_palette_max > png_ptr->num_palette)
|
if (png_ptr->num_palette_max > png_ptr->num_palette)
|
||||||
png_warning(png_ptr, "Wrote palette index exceeding num_palette");
|
png_benign_error(png_ptr, "Wrote palette index exceeding num_palette");
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* See if user wants us to write information chunks */
|
/* See if user wants us to write information chunks */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user