[libpng16] Fixed a new signed-unsigned comparison in pngrtran.c (Max Stepin).

Removed some useless typecasts from contrib/tools/png-fix-itxt.c
This commit is contained in:
Glenn Randers-Pehrson
2015-07-01 14:06:39 -05:00
parent 4e5ac72254
commit a390897ba4
4 changed files with 17 additions and 13 deletions

View File

@@ -4460,7 +4460,7 @@ png_do_expand(png_row_infop row_info, png_bytep row,
for (i = 0; i < row_width; i++)
{
if ((*sp & 0xff) == gray)
if ((*sp & 0xffU) == gray)
*dp-- = 0;
else
@@ -4478,8 +4478,8 @@ png_do_expand(png_row_infop row_info, png_bytep row,
dp = row + (row_info->rowbytes << 1) - 1;
for (i = 0; i < row_width; i++)
{
if ((*(sp - 1) & 0xff) == gray_high &&
(*(sp) & 0xff) == gray_low)
if ((*(sp - 1) & 0xffU) == gray_high &&
(*(sp) & 0xffU) == gray_low)
{
*dp-- = 0;
*dp-- = 0;