mirror of
https://git.code.sf.net/p/libpng/code.git
synced 2025-07-10 18:04:09 +02:00
[libpng14] Ignore, with a warning, out-of-range value of num_trans
in png_set_tRNS().
This commit is contained in:
parent
49ee184ba0
commit
b4c2bc864f
5
ANNOUNCE
5
ANNOUNCE
@ -1,5 +1,5 @@
|
|||||||
|
|
||||||
Libpng 1.4.13beta01 - August 3, 2012
|
Libpng 1.4.13beta01 - December 10, 2012
|
||||||
|
|
||||||
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.
|
||||||
@ -32,9 +32,10 @@ version 1.4.12 [July 10, 2012]
|
|||||||
pngsuite/README.txt.
|
pngsuite/README.txt.
|
||||||
Changed "a+w" to "u+w" in Makefile.in to fix CVE-2012-3386.
|
Changed "a+w" to "u+w" in Makefile.in to fix CVE-2012-3386.
|
||||||
|
|
||||||
version 1.4.13beta01 [August 3, 2012]
|
version 1.4.13beta01 [December 10, 2012]
|
||||||
Do not compile PNG_DEPRECATED, PNG_ALLOC and PNG_PRIVATE when __GNUC__ < 3.
|
Do not compile PNG_DEPRECATED, PNG_ALLOC and PNG_PRIVATE when __GNUC__ < 3.
|
||||||
Removed references to png_zalloc() and png_zfree() from the manual.
|
Removed references to png_zalloc() and png_zfree() from the manual.
|
||||||
|
Ignore, with a warning, out-of-range value of num_trans in png_set_tRNS().
|
||||||
|
|
||||||
Send comments/corrections/commendations to glennrp at users.sourceforge.net
|
Send comments/corrections/commendations to glennrp at users.sourceforge.net
|
||||||
or to png-mng-implement at lists.sf.net (subscription required; visit
|
or to png-mng-implement at lists.sf.net (subscription required; visit
|
||||||
|
3
CHANGES
3
CHANGES
@ -2874,9 +2874,10 @@ version 1.4.12 [July 10, 2012]
|
|||||||
pngsuite/README.txt.
|
pngsuite/README.txt.
|
||||||
Changed "a+w" to "u+w" in Makefile.in to fix CVE-2012-3386.
|
Changed "a+w" to "u+w" in Makefile.in to fix CVE-2012-3386.
|
||||||
|
|
||||||
version 1.4.13beta01 [August 3, 2012]
|
version 1.4.13beta01 [December 10, 2012]
|
||||||
Do not compile PNG_DEPRECATED, PNG_ALLOC and PNG_PRIVATE when __GNUC__ < 3.
|
Do not compile PNG_DEPRECATED, PNG_ALLOC and PNG_PRIVATE when __GNUC__ < 3.
|
||||||
Removed references to png_zalloc() and png_zfree() from the manual.
|
Removed references to png_zalloc() and png_zfree() from the manual.
|
||||||
|
Ignore, with a warning, out-of-range value of num_trans in png_set_tRNS().
|
||||||
|
|
||||||
Send comments/corrections/commendations to glennrp at users.sourceforge.net
|
Send comments/corrections/commendations to glennrp at users.sourceforge.net
|
||||||
or to png-mng-implement at lists.sf.net (subscription required; visit
|
or to png-mng-implement at lists.sf.net (subscription required; visit
|
||||||
|
8
pngset.c
8
pngset.c
@ -1,7 +1,7 @@
|
|||||||
|
|
||||||
/* pngset.c - storage of image information into info struct
|
/* pngset.c - storage of image information into info struct
|
||||||
*
|
*
|
||||||
* Last changed in libpng 1.4.11 [March 29, 2012]
|
* Last changed in libpng 1.4.13 [December 10, 2012]
|
||||||
* Copyright (c) 1998-2012 Glenn Randers-Pehrson
|
* Copyright (c) 1998-2012 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.)
|
||||||
@ -836,6 +836,12 @@ png_set_tRNS(png_structp png_ptr, png_infop info_ptr,
|
|||||||
if (png_ptr == NULL || info_ptr == NULL)
|
if (png_ptr == NULL || info_ptr == NULL)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
if (num_trans < 0 || num_trans > PNG_MAX_PALETTE_LENGTH)
|
||||||
|
{
|
||||||
|
png_warning(png_ptr, "Ignoring invalid num_trans value");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (trans_alpha != NULL)
|
if (trans_alpha != NULL)
|
||||||
{
|
{
|
||||||
/* It may not actually be necessary to set png_ptr->trans_alpha here;
|
/* It may not actually be necessary to set png_ptr->trans_alpha here;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user