mirror of
https://git.code.sf.net/p/libpng/code.git
synced 2025-07-10 18:04:09 +02:00
[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:
parent
4e5ac72254
commit
a390897ba4
6
ANNOUNCE
6
ANNOUNCE
@ -1,4 +1,4 @@
|
||||
Libpng 1.6.18beta09 - June 30, 2015
|
||||
Libpng 1.6.18beta09 - July 1, 2015
|
||||
|
||||
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.
|
||||
@ -95,7 +95,9 @@ Version 1.6.18beta08 [June 30, 2015]
|
||||
be used.
|
||||
Removed some unused WEIGHTED_FILTER macros from png.h and pngstruct.h
|
||||
|
||||
Version 1.6.18beta09 [June 30, 2015]
|
||||
Version 1.6.18beta09 [July 1, 2015]
|
||||
Removed some useless typecasts from contrib/tools/png-fix-itxt.c
|
||||
Fixed a new signed-unsigned comparison in pngrtran.c (Max Stepin).
|
||||
|
||||
Send comments/corrections/commendations to png-mng-implement at lists.sf.net
|
||||
(subscription required; visit
|
||||
|
4
CHANGES
4
CHANGES
@ -5280,7 +5280,9 @@ Version 1.6.18beta08 [June 30, 2015]
|
||||
be used.
|
||||
Removed some unused WEIGHTED_FILTER macros from png.h and pngstruct.h
|
||||
|
||||
Version 1.6.18beta09 [June 30, 2015]
|
||||
Version 1.6.18beta09 [July 1, 2015]
|
||||
Removed some useless typecasts from contrib/tools/png-fix-itxt.c
|
||||
Fixed a new signed-unsigned comparison in pngrtran.c (Max Stepin).
|
||||
|
||||
Send comments/corrections/commendations to png-mng-implement at lists.sf.net
|
||||
(subscription required; visit
|
||||
|
@ -37,7 +37,7 @@
|
||||
/* Read one character (inchar), also return octet (c), break if EOF */
|
||||
#define GETBREAK inchar=getchar(); \
|
||||
c=(inchar & 0xffU);\
|
||||
if (inchar != (int) c) break
|
||||
if (inchar != c) break
|
||||
int
|
||||
main(void)
|
||||
{
|
||||
@ -54,7 +54,7 @@ main(void)
|
||||
putchar(c);
|
||||
}
|
||||
|
||||
if (inchar == (int) c) /* !EOF */
|
||||
if (inchar == c) /* !EOF */
|
||||
for (;;)
|
||||
{
|
||||
/* Read the length */
|
||||
@ -86,7 +86,7 @@ for (;;)
|
||||
GETBREAK; buf[i] = c;
|
||||
}
|
||||
|
||||
if (inchar != (int) c) /* EOF */
|
||||
if (inchar != c) /* EOF */
|
||||
break;
|
||||
|
||||
/* Calculate the CRC */
|
||||
@ -113,7 +113,7 @@ for (;;)
|
||||
crc = crc32(crc, buf+7+length, 1);
|
||||
}
|
||||
|
||||
if (inchar != (int) c) /* EOF */
|
||||
if (inchar != c) /* EOF */
|
||||
break;
|
||||
|
||||
/* Update length bytes */
|
||||
@ -129,7 +129,7 @@ for (;;)
|
||||
|
||||
else
|
||||
{
|
||||
if (inchar != (int) c) /* EOF */
|
||||
if (inchar != c) /* EOF */
|
||||
break;
|
||||
|
||||
/* Copy bytes that were already read (length and chunk name) */
|
||||
@ -143,7 +143,7 @@ for (;;)
|
||||
putchar(c);
|
||||
}
|
||||
|
||||
if (inchar != (int) c) /* EOF */
|
||||
if (inchar != c) /* EOF */
|
||||
{
|
||||
break;
|
||||
}
|
||||
@ -153,7 +153,7 @@ for (;;)
|
||||
break;
|
||||
}
|
||||
|
||||
if (inchar != (int) c) /* EOF */
|
||||
if (inchar != c) /* EOF */
|
||||
break;
|
||||
|
||||
if (buf[4] == 73 && buf[5] == 69 && buf[6] == 78 && buf[7] == 68)
|
||||
|
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user