diff --git a/ANNOUNCE b/ANNOUNCE index 2afc09adc..8c1a416b4 100644 --- a/ANNOUNCE +++ b/ANNOUNCE @@ -1,4 +1,4 @@ -Libpng 1.6.17beta06 - February 25, 2015 +Libpng 1.6.17beta06 - February 28, 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. @@ -59,7 +59,11 @@ Version 1.6.17beta04 [February 21, 2015] Version 1.6.17beta05 [February 25, 2015] Restored compiling of png_reciprocal2 with PNG_NO_16BIT. -Version 1.6.17beta06 [February 25, 2015] +Version 1.6.17beta06 [February 28, 2015] + Moved png_set_filter() prototype into a PNG_WRITE_SUPPORTED block + of png.h. + Avoid runtime checks when converting integer to png_byte with + Visual Studio (Sergey Kosarevsky) Send comments/corrections/commendations to png-mng-implement at lists.sf.net (subscription required; visit diff --git a/CHANGES b/CHANGES index 76d6644c7..0ad7ac445 100644 --- a/CHANGES +++ b/CHANGES @@ -5160,7 +5160,11 @@ Version 1.6.17beta04 [February 21, 2015] Version 1.6.17beta05 [February 25, 2015] Restored compiling of png_reciprocal2 with PNG_NO_16BIT. -Version 1.6.17beta06 [February 25, 2015] +Version 1.6.17beta06 [February 28, 2015] + Moved png_set_filter() prototype into a PNG_WRITE_SUPPORTED block + of png.h. + Avoid runtime checks when converting integer to png_byte with + Visual Studio (Sergey Kosarevsky) Send comments/corrections/commendations to png-mng-implement at lists.sf.net (subscription required; visit diff --git a/pngpriv.h b/pngpriv.h index 3804ae9c8..a986b1e16 100644 --- a/pngpriv.h +++ b/pngpriv.h @@ -748,8 +748,8 @@ * systems where (char) is more than 8 bits. */ #define PNG_STRING_FROM_CHUNK(s,c)\ - (void)(((char*)(s))[0]=(char)((c)>>24), ((char*)(s))[1]=(char)((c)>>16),\ - ((char*)(s))[2]=(char)((c)>>8), ((char*)(s))[3]=(char)((c))) + (void)(((char*)(s))[0]=(char)(((c)>>24)&0xFF), ((char*)(s))[1]=(char)(((c)>>16)&0xFF),\ + ((char*)(s))[2]=(char)(((c)>>8)&0xFF), ((char*)(s))[3]=(char)((c&0xFF))) /* Do the same but terminate with a null character. */ #define PNG_CSTRING_FROM_CHUNK(s,c)\ diff --git a/pngrutil.c b/pngrutil.c index f05f870b8..39b795d6a 100644 --- a/pngrutil.c +++ b/pngrutil.c @@ -3850,7 +3850,7 @@ png_read_filter_row_paeth_multibyte_pixel(png_row_infop row_info, png_bytep row, while (row < rp_end) { int a = *row + *prev_row++; - *row++ = (png_byte)a; + *row++ = (png_byte)(a&0xFF); } /* Remainder */ @@ -3881,7 +3881,7 @@ png_read_filter_row_paeth_multibyte_pixel(png_row_infop row_info, png_bytep row, if (pc < pa) a = c; a += *row; - *row++ = (png_byte)a; + *row++ = (png_byte)(a&0xFF); } }