mirror of
https://git.code.sf.net/p/libpng/code.git
synced 2025-07-10 18:04:09 +02:00
[libpng16] Changed png_ptr->options from a png_byte to png_uint_32, to
accomodate up to 16 options.
This commit is contained in:
parent
f981826204
commit
f8bdbd4d8f
6
ANNOUNCE
6
ANNOUNCE
@ -1,4 +1,4 @@
|
|||||||
Libpng 1.6.28beta01 - January 2, 2017
|
Libpng 1.6.28beta01 - January 3, 2017
|
||||||
|
|
||||||
This is not intended to be a public release. It will be replaced
|
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.
|
within a few weeks by a public version or by another test version.
|
||||||
@ -25,11 +25,13 @@ Other information:
|
|||||||
|
|
||||||
Changes since the last public release (1.6.27):
|
Changes since the last public release (1.6.27):
|
||||||
|
|
||||||
Version 1.6.28beta01 [January 2, 2017]
|
Version 1.6.28beta01 [January 3, 2017]
|
||||||
Fixed arm/aarch64 detection in CMakeLists.txt (Gianfranco Costamagna).
|
Fixed arm/aarch64 detection in CMakeLists.txt (Gianfranco Costamagna).
|
||||||
Added option to Cmake build allowing a custom location of zlib to be
|
Added option to Cmake build allowing a custom location of zlib to be
|
||||||
specified in a scenario where libpng is being built as a subproject
|
specified in a scenario where libpng is being built as a subproject
|
||||||
alongside zlib by another project (Sam Serrels).
|
alongside zlib by another project (Sam Serrels).
|
||||||
|
Changed png_ptr->options from a png_byte to png_uint_32, to accomodate
|
||||||
|
up to 16 options.
|
||||||
|
|
||||||
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
@ -5774,11 +5774,13 @@ Version 1.6.27 [December 29, 2016]
|
|||||||
Fixed a potential null pointer dereference in png_set_text_2() (bug report
|
Fixed a potential null pointer dereference in png_set_text_2() (bug report
|
||||||
and patch by Patrick Keshishian, CVE-2016-10087).
|
and patch by Patrick Keshishian, CVE-2016-10087).
|
||||||
|
|
||||||
Version 1.6.28beta01 [January 2, 2017]
|
Version 1.6.28beta01 [January 3, 2017]
|
||||||
Fixed arm/aarch64 detection in CMakeLists.txt (Gianfranco Costamagna).
|
Fixed arm/aarch64 detection in CMakeLists.txt (Gianfranco Costamagna).
|
||||||
Added option to Cmake build allowing a custom location of zlib to be
|
Added option to Cmake build allowing a custom location of zlib to be
|
||||||
specified in a scenario where libpng is being built as a subproject
|
specified in a scenario where libpng is being built as a subproject
|
||||||
alongside zlib by another project (Sam Serrels).
|
alongside zlib by another project (Sam Serrels).
|
||||||
|
Changed png_ptr->options from a png_byte to png_uint_32, to accomodate
|
||||||
|
up to 16 options.
|
||||||
|
|
||||||
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
|
||||||
|
14
png.c
14
png.c
@ -1,7 +1,7 @@
|
|||||||
|
|
||||||
/* png.c - location for general purpose libpng functions
|
/* png.c - location for general purpose libpng functions
|
||||||
*
|
*
|
||||||
* Last changed in libpng 1.6.27 [December 29, 2016]
|
* Last changed in libpng 1.6.28 [(PENDING RELEASE)]
|
||||||
* Copyright (c) 1998-2002,2004,2006-2017 Glenn Randers-Pehrson
|
* Copyright (c) 1998-2002,2004,2006-2017 Glenn Randers-Pehrson
|
||||||
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
||||||
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
|
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
|
||||||
@ -776,14 +776,14 @@ png_get_copyright(png_const_structrp png_ptr)
|
|||||||
#else
|
#else
|
||||||
# ifdef __STDC__
|
# ifdef __STDC__
|
||||||
return PNG_STRING_NEWLINE \
|
return PNG_STRING_NEWLINE \
|
||||||
"libpng version 1.6.28beta01 - December 30, 2016" PNG_STRING_NEWLINE \
|
"libpng version 1.6.28beta01 - January 3, 2017" PNG_STRING_NEWLINE \
|
||||||
"Copyright (c) 1998-2002,2004,2006-2017 Glenn Randers-Pehrson" \
|
"Copyright (c) 1998-2002,2004,2006-2017 Glenn Randers-Pehrson" \
|
||||||
PNG_STRING_NEWLINE \
|
PNG_STRING_NEWLINE \
|
||||||
"Copyright (c) 1996-1997 Andreas Dilger" PNG_STRING_NEWLINE \
|
"Copyright (c) 1996-1997 Andreas Dilger" PNG_STRING_NEWLINE \
|
||||||
"Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc." \
|
"Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc." \
|
||||||
PNG_STRING_NEWLINE;
|
PNG_STRING_NEWLINE;
|
||||||
# else
|
# else
|
||||||
return "libpng version 1.6.28beta01 - December 30, 2016\
|
return "libpng version 1.6.28beta01 - January 3, 2017\
|
||||||
Copyright (c) 1998-2002,2004,2006-2017 Glenn Randers-Pehrson\
|
Copyright (c) 1998-2002,2004,2006-2017 Glenn Randers-Pehrson\
|
||||||
Copyright (c) 1996-1997 Andreas Dilger\
|
Copyright (c) 1996-1997 Andreas Dilger\
|
||||||
Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc.";
|
Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc.";
|
||||||
@ -4260,11 +4260,11 @@ png_set_option(png_structrp png_ptr, int option, int onoff)
|
|||||||
if (png_ptr != NULL && option >= 0 && option < PNG_OPTION_NEXT &&
|
if (png_ptr != NULL && option >= 0 && option < PNG_OPTION_NEXT &&
|
||||||
(option & 1) == 0)
|
(option & 1) == 0)
|
||||||
{
|
{
|
||||||
int mask = 3 << option;
|
png_uint_32 mask = 3 << option;
|
||||||
int setting = (2 + (onoff != 0)) << option;
|
png_uint_32 setting = (2 + (onoff != 0)) << option;
|
||||||
int current = png_ptr->options;
|
png_uint_32 current = png_ptr->options;
|
||||||
|
|
||||||
png_ptr->options = (png_byte)(((current & ~mask) | setting) & 0xff);
|
png_ptr->options = (png_uint_32)(((current & ~mask) | setting) & 0xff);
|
||||||
|
|
||||||
return (current & mask) >> option;
|
return (current & mask) >> option;
|
||||||
}
|
}
|
||||||
|
10
png.h
10
png.h
@ -1,7 +1,7 @@
|
|||||||
|
|
||||||
/* png.h - header file for PNG reference library
|
/* png.h - header file for PNG reference library
|
||||||
*
|
*
|
||||||
* libpng version 1.6.28beta01, December 30, 2016
|
* libpng version 1.6.28beta01, January 3, 2017
|
||||||
*
|
*
|
||||||
* Copyright (c) 1998-2002,2004,2006-2017 Glenn Randers-Pehrson
|
* Copyright (c) 1998-2002,2004,2006-2017 Glenn Randers-Pehrson
|
||||||
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
||||||
@ -12,7 +12,7 @@
|
|||||||
* Authors and maintainers:
|
* Authors and maintainers:
|
||||||
* libpng versions 0.71, May 1995, through 0.88, January 1996: Guy Schalnat
|
* libpng versions 0.71, May 1995, through 0.88, January 1996: Guy Schalnat
|
||||||
* libpng versions 0.89, June 1996, through 0.96, May 1997: Andreas Dilger
|
* libpng versions 0.89, June 1996, through 0.96, May 1997: Andreas Dilger
|
||||||
* libpng versions 0.97, January 1998, through 1.6.28beta01, December 30, 2016:
|
* libpng versions 0.97, January 1998, through 1.6.28beta01, January 3, 2017:
|
||||||
* Glenn Randers-Pehrson.
|
* Glenn Randers-Pehrson.
|
||||||
* See also "Contributing Authors", below.
|
* See also "Contributing Authors", below.
|
||||||
*/
|
*/
|
||||||
@ -25,7 +25,7 @@
|
|||||||
*
|
*
|
||||||
* This code is released under the libpng license.
|
* This code is released under the libpng license.
|
||||||
*
|
*
|
||||||
* libpng versions 1.0.7, July 1, 2000 through 1.6.28beta01, December 30, 2016 are
|
* libpng versions 1.0.7, July 1, 2000 through 1.6.28beta01, January 3, 2017 are
|
||||||
* Copyright (c) 2000-2002, 2004, 2006-2017 Glenn Randers-Pehrson, are
|
* Copyright (c) 2000-2002, 2004, 2006-2017 Glenn Randers-Pehrson, are
|
||||||
* derived from libpng-1.0.6, and are distributed according to the same
|
* derived from libpng-1.0.6, and are distributed according to the same
|
||||||
* disclaimer and license as libpng-1.0.6 with the following individuals
|
* disclaimer and license as libpng-1.0.6 with the following individuals
|
||||||
@ -239,7 +239,7 @@
|
|||||||
* Y2K compliance in libpng:
|
* Y2K compliance in libpng:
|
||||||
* =========================
|
* =========================
|
||||||
*
|
*
|
||||||
* December 30, 2016
|
* January 3, 2017
|
||||||
*
|
*
|
||||||
* Since the PNG Development group is an ad-hoc body, we can't make
|
* Since the PNG Development group is an ad-hoc body, we can't make
|
||||||
* an official declaration.
|
* an official declaration.
|
||||||
@ -308,7 +308,7 @@
|
|||||||
|
|
||||||
/* Version information for png.h - this should match the version in png.c */
|
/* Version information for png.h - this should match the version in png.c */
|
||||||
#define PNG_LIBPNG_VER_STRING "1.6.28beta01"
|
#define PNG_LIBPNG_VER_STRING "1.6.28beta01"
|
||||||
#define PNG_HEADER_VERSION_STRING " libpng version 1.6.28beta01 - December 30, 2016\n"
|
#define PNG_HEADER_VERSION_STRING " libpng version 1.6.28beta01 - January 3, 2017\n"
|
||||||
|
|
||||||
#define PNG_LIBPNG_VER_SONUM 16
|
#define PNG_LIBPNG_VER_SONUM 16
|
||||||
#define PNG_LIBPNG_VER_DLLNUM 16
|
#define PNG_LIBPNG_VER_DLLNUM 16
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
|
|
||||||
/* pngstruct.h - header file for PNG reference library
|
/* pngstruct.h - header file for PNG reference library
|
||||||
*
|
*
|
||||||
* Last changed in libpng 1.6.24 [August 4, 2016]
|
* Last changed in libpng 1.6.28 [(PENDING RELEASE)]
|
||||||
* Copyright (c) 1998-2002,2004,2006-2016 Glenn Randers-Pehrson
|
* Copyright (c) 1998-2002,2004,2006-2017 Glenn Randers-Pehrson
|
||||||
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
|
||||||
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
|
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
|
||||||
*
|
*
|
||||||
@ -353,7 +353,7 @@ struct png_struct_def
|
|||||||
|
|
||||||
/* Options */
|
/* Options */
|
||||||
#ifdef PNG_SET_OPTION_SUPPORTED
|
#ifdef PNG_SET_OPTION_SUPPORTED
|
||||||
png_byte options; /* On/off state (up to 4 options) */
|
png_uint_32 options; /* On/off state (up to 16 options) */
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if PNG_LIBPNG_VER < 10700
|
#if PNG_LIBPNG_VER < 10700
|
||||||
|
Loading…
x
Reference in New Issue
Block a user