diff --git a/ANNOUNCE b/ANNOUNCE index ee1ee687..e0c0bcfa 100644 --- a/ANNOUNCE +++ b/ANNOUNCE @@ -1,5 +1,5 @@ -Libpng 1.2.53beta02 - February 5, 2015 +Libpng 1.2.53beta02 - February 6, 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. @@ -45,7 +45,7 @@ Changes since the last public release (1.2.52): version 1.2.53beta01 [omitted] -version 1.2.53beta02 [%RDATE%] +version 1.2.53beta02 [February 6, 2015] Issue a png_error() instead of a png_warning() when width is potentially too large for the architecture, in case the calling application has overridden the default 1,000,000-column limit diff --git a/CHANGES b/CHANGES index cb22be41..0ce4fc42 100644 --- a/CHANGES +++ b/CHANGES @@ -2830,7 +2830,7 @@ version 1.0.62 and 1.2.52 [November 20, 2014] version 1.2.53beta01 [omitted] -version 1.2.53beta02 [%RDATE%] +version 1.2.53beta02 [February 6, 2015] Issue a png_error() instead of a png_warning() when width is potentially too large for the architecture, in case the calling application has overridden the default 1,000,000-column limit diff --git a/png.c b/png.c index 086b6a32..26cc2c79 100644 --- a/png.c +++ b/png.c @@ -1,8 +1,8 @@ /* png.c - location for general purpose libpng functions * - * Last changed in libpng 1.2.51 [February 6, 2014] - * Copyright (c) 1998-2014 Glenn Randers-Pehrson + * Last changed in libpng 1.2.53 [February 6, 2015] + * Copyright (c) 1998-2015 Glenn Randers-Pehrson * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger) * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.) * @@ -158,12 +158,16 @@ voidpf /* PRIVATE */ png_zalloc(voidpf png_ptr, uInt items, uInt size) { png_voidp ptr; - png_structp p=(png_structp)png_ptr; - png_uint_32 save_flags=p->flags; + png_structp p; + png_uint_32 save_flags; png_uint_32 num_bytes; if (png_ptr == NULL) return (NULL); + + p=(png_structp)png_ptr; + save_flags=p->flags; + if (items > PNG_UINT_32_MAX/size) { png_warning (p, "Potential overflow in png_zalloc()"); @@ -724,13 +728,13 @@ png_get_copyright(png_structp png_ptr) #else #ifdef __STDC__ return ((png_charp) PNG_STRING_NEWLINE \ - "libpng version 1.2.53beta02 - February 5, 2015" PNG_STRING_NEWLINE \ + "libpng version 1.2.53beta02 - February 6, 2015" PNG_STRING_NEWLINE \ "Copyright (c) 1998-2014 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 ((png_charp) "libpng version 1.2.53beta02 - February 5, 2015\ + return ((png_charp) "libpng version 1.2.53beta02 - February 6, 2015\ Copyright (c) 1998-2014 Glenn Randers-Pehrson\ Copyright (c) 1996-1997 Andreas Dilger\ Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc."); diff --git a/pngget.c b/pngget.c index cc824b39..8db1d247 100644 --- a/pngget.c +++ b/pngget.c @@ -1,7 +1,7 @@ /* pngget.c - retrieval of values from info struct * - * Last changed in libpng 1.2.53 [%RDATE%] + * Last changed in libpng 1.2.53 [February 6, 2015] * Copyright (c) 1998-2015 Glenn Randers-Pehrson * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger) * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.) diff --git a/pngread.c b/pngread.c index bbe015f6..2aee8ecc 100644 --- a/pngread.c +++ b/pngread.c @@ -1,7 +1,7 @@ /* pngread.c - read a PNG file * - * Last changed in libpng 1.2.53 [%RDATE%] + * Last changed in libpng 1.2.53 [February 6, 2015] * Copyright (c) 1998-2015 Glenn Randers-Pehrson * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger) * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.) diff --git a/pngrtran.c b/pngrtran.c index 0254d832..b7a74887 100644 --- a/pngrtran.c +++ b/pngrtran.c @@ -1,7 +1,7 @@ /* pngrtran.c - transforms the data in a row for PNG readers * - * Last changed in libpng 1.2.53 [%RDATE%] + * Last changed in libpng 1.2.53 [February 6, 2015] * Copyright (c) 1998-2015 Glenn Randers-Pehrson * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger) * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.) diff --git a/pngrutil.c b/pngrutil.c index 7c388635..bd517b13 100644 --- a/pngrutil.c +++ b/pngrutil.c @@ -1,7 +1,7 @@ /* pngrutil.c - utilities to read a PNG file * - * Last changed in libpng 1.2.53 [%RDATE%] + * Last changed in libpng 1.2.53 [February 6, 2015] * Copyright (c) 1998-2015 Glenn Randers-Pehrson * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger) * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.) @@ -57,10 +57,10 @@ png_get_uint_31(png_structp png_ptr, png_bytep buf) png_uint_32 i = png_get_uint_32(buf); #else /* Avoid an extra function call by inlining the result. */ - png_uint_32 i = ((png_uint_32)(*buf) << 24) + - ((png_uint_32)(*(buf + 1)) << 16) + - ((png_uint_32)(*(buf + 2)) << 8) + - ((png_uint_32)(*(buf + 3)) ); + png_uint_32 i = ((png_uint_32)((*(buf )) & 0xff) << 24) + + ((png_uint_32)((*(buf + 1)) & 0xff) << 16) + + ((png_uint_32)((*(buf + 2)) & 0xff) << 8) + + ((png_uint_32)((*(buf + 3)) & 0xff) ); #endif if (i > PNG_UINT_31_MAX) png_error(png_ptr, "PNG unsigned integer out of range."); @@ -71,10 +71,10 @@ png_get_uint_31(png_structp png_ptr, png_bytep buf) png_uint_32 PNGAPI png_get_uint_32(png_bytep buf) { - png_uint_32 i = ((png_uint_32)(*buf) << 24) + - ((png_uint_32)(*(buf + 1)) << 16) + - ((png_uint_32)(*(buf + 2)) << 8) + - (png_uint_32)(*(buf + 3)); + png_uint_32 i = ((png_uint_32)((*(buf )) & 0xff) << 24) + + ((png_uint_32)((*(buf + 1)) & 0xff) << 16) + + ((png_uint_32)((*(buf + 2)) & 0xff) << 8) + + ((png_uint_32)((*(buf + 3)) & 0xff) ); return (i); } @@ -86,10 +86,10 @@ png_get_uint_32(png_bytep buf) png_int_32 PNGAPI png_get_int_32(png_bytep buf) { - png_int_32 i = ((png_int_32)(*buf) << 24) + - ((png_int_32)(*(buf + 1)) << 16) + - ((png_int_32)(*(buf + 2)) << 8) + - (png_int_32)(*(buf + 3)); + png_int_32 i = ((png_int_32)((*(buf )) & 0xff) << 24) + + ((png_int_32)((*(buf + 1)) & 0xff) << 16) + + ((png_int_32)((*(buf + 2)) & 0xff) << 8) + + ((png_int_32)((*(buf + 3)) & 0xff) ); return (i); } @@ -98,8 +98,8 @@ png_get_int_32(png_bytep buf) png_uint_16 PNGAPI png_get_uint_16(png_bytep buf) { - png_uint_16 i = (png_uint_16)(((png_uint_16)(*buf) << 8) + - (png_uint_16)(*(buf + 1))); + png_uint_16 i = ((png_uint_16)((*(buf )) & 0xff) << 8) + + ((png_uint_16)((*(buf + 1)) & 0xff) ); return (i); } diff --git a/pngset.c b/pngset.c index 6793787d..e2a12df5 100644 --- a/pngset.c +++ b/pngset.c @@ -1,7 +1,7 @@ /* pngset.c - storage of image information into info struct * - * Last changed in libpng 1.2.53 [%RDATE%] + * Last changed in libpng 1.2.53 [February 6, 2015] * Copyright (c) 1998-2015 Glenn Randers-Pehrson * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger) * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.) diff --git a/pngwrite.c b/pngwrite.c index 251ac552..3dce3d3c 100644 --- a/pngwrite.c +++ b/pngwrite.c @@ -1,7 +1,7 @@ /* pngwrite.c - general routines to write a PNG file * - * Last changed in libpng 1.2.53 [%RDATE%] + * Last changed in libpng 1.2.53 [February 6, 2015] * Copyright (c) 1998-2015 Glenn Randers-Pehrson * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger) * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.) diff --git a/pngwutil.c b/pngwutil.c index fa398353..8c94921f 100644 --- a/pngwutil.c +++ b/pngwutil.c @@ -1,7 +1,7 @@ /* pngwutil.c - utilities to write a PNG file * - * Last changed in libpng 1.2.53 [%RDATE%] + * Last changed in libpng 1.2.53 [February 6, 2015] * Copyright (c) 1998-2015 Glenn Randers-Pehrson * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger) * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)