mirror of
https://git.code.sf.net/p/libpng/code.git
synced 2025-07-10 18:04:09 +02:00
[libpng15] Suppress clang warnings about implicit sign changes in png.c
This commit is contained in:
parent
11fc1f0f26
commit
d0023a7391
5
ANNOUNCE
5
ANNOUNCE
@ -1,5 +1,5 @@
|
||||
|
||||
Libpng 1.5.29beta01 - December 30, 2016
|
||||
Libpng 1.5.29beta01 - March 1, 2017
|
||||
|
||||
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.
|
||||
@ -26,7 +26,8 @@ Other information:
|
||||
|
||||
Changes since the last public release (1.5.28):
|
||||
|
||||
version 1.5.29beta01 [December 30, 2016]
|
||||
version 1.5.29beta01 [March 1, 2017]
|
||||
Suppress clang warnings about implicit sign changes in png.c
|
||||
|
||||
Send comments/corrections/commendations to png-mng-implement at lists.sf.net
|
||||
(subscription required; visit
|
||||
|
3
CHANGES
3
CHANGES
@ -4531,7 +4531,8 @@ version 1.5.28 [December 29, 2016]
|
||||
Fixed a potential null pointer dereference in png_set_text_2() (bug report
|
||||
and patch by Patrick Keshishian, CVE-2016-10087).
|
||||
|
||||
version 1.5.29beta01 [December 30, 2016]
|
||||
version 1.5.29beta01 [March 1, 2017]
|
||||
Suppress clang warnings about implicit sign changes in png.c
|
||||
|
||||
Send comments/corrections/commendations to png-mng-implement at lists.sf.net
|
||||
(subscription required; visit
|
||||
|
10
png.c
10
png.c
@ -656,14 +656,14 @@ png_get_copyright(png_const_structp png_ptr)
|
||||
#else
|
||||
# ifdef __STDC__
|
||||
return PNG_STRING_NEWLINE \
|
||||
"libpng version 1.5.29beta01 - December 30, 2016" PNG_STRING_NEWLINE \
|
||||
"libpng version 1.5.29beta01 - March 1, 2017" PNG_STRING_NEWLINE \
|
||||
"Copyright (c) 1998-2002,2004,2006-2017 Glenn Randers-Pehrson" \
|
||||
PNG_STRING_NEWLINE \
|
||||
"Copyright (c) 1996-1997 Andreas Dilger" PNG_STRING_NEWLINE \
|
||||
"Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc." \
|
||||
PNG_STRING_NEWLINE;
|
||||
# else
|
||||
return "libpng version 1.5.29beta01 - December 30, 2016\
|
||||
return "libpng version 1.5.29beta01 - March 1, 2017\
|
||||
Copyright (c) 1998-2002,2004,2006-2017 Glenn Randers-Pehrson\
|
||||
Copyright (c) 1996-1997 Andreas Dilger\
|
||||
Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc.";
|
||||
@ -2926,13 +2926,13 @@ png_set_option(png_structp png_ptr, int option, int onoff)
|
||||
if (png_ptr != NULL && option >= 0 && option < PNG_OPTION_NEXT &&
|
||||
(option & 1) == 0)
|
||||
{
|
||||
int mask = 3 << option;
|
||||
int setting = (2 + (onoff != 0)) << option;
|
||||
int mask = 3U << option;
|
||||
int setting = (2U + (onoff != 0)) << option;
|
||||
int current = png_ptr->options;
|
||||
|
||||
png_ptr->options = (png_byte)((current & ~mask) | setting);
|
||||
|
||||
return (current & mask) >> option;
|
||||
return (int)(current & mask) >> option;
|
||||
}
|
||||
|
||||
return PNG_OPTION_INVALID;
|
||||
|
Loading…
x
Reference in New Issue
Block a user