mirror of
https://git.code.sf.net/p/libpng/code.git
synced 2025-07-10 18:04:09 +02:00
[libpng16] Fixed bug introduced in libpng-1.6.0beta28 that causes libpng to
handle chunks even when they have been tagged PNG_HANDLE_CHUNK_NEVER.
This commit is contained in:
parent
1118d6d985
commit
96cf4bde0e
6
ANNOUNCE
6
ANNOUNCE
@ -1,5 +1,5 @@
|
||||
|
||||
Libpng 1.6.1beta05 - March 1, 2013
|
||||
Libpng 1.6.1beta05 - March 2, 2013
|
||||
|
||||
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.
|
||||
@ -64,8 +64,10 @@ Version 1.6.1beta04 [February 27, 2013]
|
||||
Revised scripts/dfn.awk to work with the buggy MSYS awk that has trouble
|
||||
with CRLF line endings.
|
||||
|
||||
Version 1.6.1beta05 [March 1, 2013]
|
||||
Version 1.6.1beta05 [March 2, 2013]
|
||||
Avoid a possible memory leak in contrib/gregbook/readpng.c
|
||||
Fixed bug introduced in libpng-1.6.0beta28 that causes libpng to handle chunks
|
||||
even when they have been tagged PNG_HANDLE_CHUNK_NEVER.
|
||||
|
||||
Send comments/corrections/commendations to png-mng-implement at lists.sf.net
|
||||
(subscription required; visit
|
||||
|
4
CHANGES
4
CHANGES
@ -4421,8 +4421,10 @@ Version 1.6.1beta04 [February 27, 2013]
|
||||
Revised scripts/dfn.awk to work with the buggy MSYS awk that has trouble
|
||||
with CRLF line endings.
|
||||
|
||||
Version 1.6.1beta05 [March 1, 2013]
|
||||
Version 1.6.1beta05 [March 2, 2013]
|
||||
Avoid a possible memory leak in contrib/gregbook/readpng.c
|
||||
Fixed bug introduced in libpng-1.6.0beta28 that causes libpng to handle chunks
|
||||
even when they have been tagged PNG_HANDLE_CHUNK_NEVER.
|
||||
|
||||
Send comments/corrections/commendations to png-mng-implement at lists.sf.net
|
||||
(subscription required; visit
|
||||
|
12
png.h
12
png.h
@ -1,7 +1,7 @@
|
||||
|
||||
/* png.h - header file for PNG reference library
|
||||
*
|
||||
* libpng version 1.6.1beta05 - February 27, 2013
|
||||
* libpng version 1.6.1beta05 - March 2, 2013
|
||||
* Copyright (c) 1998-2013 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.)
|
||||
@ -11,7 +11,7 @@
|
||||
* Authors and maintainers:
|
||||
* libpng versions 0.71, May 1995, through 0.88, January 1996: Guy Schalnat
|
||||
* libpng versions 0.89c, June 1996, through 0.96, May 1997: Andreas Dilger
|
||||
* libpng versions 0.97, January 1998, through 1.6.1beta05 - February 27, 2013: Glenn
|
||||
* libpng versions 0.97, January 1998, through 1.6.1beta05 - March 2, 2013: Glenn
|
||||
* See also "Contributing Authors", below.
|
||||
*
|
||||
* Note about libpng version numbers:
|
||||
@ -201,7 +201,7 @@
|
||||
*
|
||||
* This code is released under the libpng license.
|
||||
*
|
||||
* libpng versions 1.2.6, August 15, 2004, through 1.6.1beta05, February 27, 2013, are
|
||||
* libpng versions 1.2.6, August 15, 2004, through 1.6.1beta05, March 2, 2013, are
|
||||
* Copyright (c) 2004, 2006-2013 Glenn Randers-Pehrson, and are
|
||||
* distributed according to the same disclaimer and license as libpng-1.2.5
|
||||
* with the following individual added to the list of Contributing Authors:
|
||||
@ -313,7 +313,7 @@
|
||||
* Y2K compliance in libpng:
|
||||
* =========================
|
||||
*
|
||||
* February 27, 2013
|
||||
* March 2, 2013
|
||||
*
|
||||
* Since the PNG Development group is an ad-hoc body, we can't make
|
||||
* an official declaration.
|
||||
@ -381,7 +381,7 @@
|
||||
/* Version information for png.h - this should match the version in png.c */
|
||||
#define PNG_LIBPNG_VER_STRING "1.6.1beta05"
|
||||
#define PNG_HEADER_VERSION_STRING \
|
||||
" libpng version 1.6.1beta05 - February 27, 2013\n"
|
||||
" libpng version 1.6.1beta05 - March 2, 2013\n"
|
||||
|
||||
#define PNG_LIBPNG_VER_SONUM 16
|
||||
#define PNG_LIBPNG_VER_DLLNUM 16
|
||||
@ -2373,7 +2373,7 @@ PNG_EXPORT(171, void, png_set_sCAL_s, (png_const_structrp png_ptr,
|
||||
* READ:
|
||||
* PNG_HANDLE_CHUNK_AS_DEFAULT:
|
||||
* Known chunks: do normal libpng processing, do not keep the chunk (but
|
||||
* set the comments below about PNG_HANDLE_AS_UNKNOWN_SUPPORTED)
|
||||
* see the comments below about PNG_HANDLE_AS_UNKNOWN_SUPPORTED)
|
||||
* Unknown chunks: for a specific chunk use the global default, when used
|
||||
* as the default discard the chunk data.
|
||||
* PNG_HANDLE_CHUNK_NEVER:
|
||||
|
13
pngrutil.c
13
pngrutil.c
@ -2804,21 +2804,22 @@ png_handle_unknown(png_structrp png_ptr, png_inforp info_ptr,
|
||||
{
|
||||
/* If the keep value is 'default' or 'never' override it, but
|
||||
* still error out on critical chunks unless the keep value is
|
||||
* 'always' While this is weird it is the behavior in 1.4.12. A
|
||||
* possible improvement would be to obey the value set for the
|
||||
* 'always' While this is weird it is the behavior in 1.4.12.
|
||||
* A possible improvement would be to obey the value set for the
|
||||
* chunk, but this would be an API change that would probably
|
||||
* damage some applications.
|
||||
*
|
||||
* The png_app_warning below catches the case that matters, where
|
||||
* the application has neither set specific save for this chunk
|
||||
* or global save.
|
||||
* the application has not set specific save or ignore for this
|
||||
* chunk or global save or ignore.
|
||||
*/
|
||||
if (keep < PNG_HANDLE_CHUNK_IF_SAFE)
|
||||
if (keep < PNG_HANDLE_CHUNK_NEVER)
|
||||
{
|
||||
# ifdef PNG_SET_UNKNOWN_CHUNKS_SUPPORTED
|
||||
if (png_ptr->unknown_default < PNG_HANDLE_CHUNK_IF_SAFE)
|
||||
png_app_warning(png_ptr,
|
||||
"forcing save of an unhandled chunk; please call png_set_keep_unknown_chunks");
|
||||
"forcing save of an unhandled chunk;"
|
||||
" please call png_set_keep_unknown_chunks");
|
||||
# endif
|
||||
keep = PNG_HANDLE_CHUNK_IF_SAFE;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user