mirror of
https://git.code.sf.net/p/libpng/code.git
synced 2025-07-10 18:04:09 +02:00
[libpng16] Ignore, with a warning, out-of-range value of num_trans in
png_set_tRNS().
This commit is contained in:
parent
a8488b78dc
commit
b0673cb50f
1
ANNOUNCE
1
ANNOUNCE
@ -35,6 +35,7 @@ Version 1.5.14beta01 [October 24, 2012]
|
||||
Version 1.5.14beta02 [December 10, 2012]
|
||||
Added missing "-" in front of DNO_GZIP in contrib/pngminim/*/makefile.
|
||||
Check for png_ptr==NULL earlier in png_zalloc().
|
||||
Ignore, with a warning, out-of-range value of num_trans in png_set_tRNS().
|
||||
|
||||
Send comments/corrections/commendations to png-mng-implement at lists.sf.net
|
||||
(subscription required; visit
|
||||
|
||||
1
CHANGES
1
CHANGES
@ -3928,6 +3928,7 @@ Version 1.5.14beta01 [October 24, 2012]
|
||||
Version 1.5.14beta02 [December 10, 2012]
|
||||
Added missing "-" in front of DNO_GZIP in contrib/pngminim/*/makefile.
|
||||
Check for png_ptr==NULL earlier in png_zalloc().
|
||||
Ignore, with a warning, out-of-range value of num_trans in png_set_tRNS().
|
||||
|
||||
Send comments/corrections/commendations to png-mng-implement at lists.sf.net
|
||||
(subscription required; visit
|
||||
|
||||
6
pngset.c
6
pngset.c
@ -897,6 +897,12 @@ png_set_tRNS(png_structp png_ptr, png_infop info_ptr,
|
||||
if (png_ptr == NULL || info_ptr == NULL)
|
||||
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)
|
||||
{
|
||||
/* It may not actually be necessary to set png_ptr->trans_alpha here;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user