diff --git a/ANNOUNCE b/ANNOUNCE index 319eb27dc..d2fb82520 100644 --- a/ANNOUNCE +++ b/ANNOUNCE @@ -1,5 +1,5 @@ -Libpng 1.5.0beta05 - February 9, 2010 +Libpng 1.4.1beta11 - February 12, 2010 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. @@ -9,45 +9,78 @@ Files available for download: Source files with LF line endings (for Unix/Linux) and with a "configure" script - 1.5.0beta05.tar.xz (LZMA-compressed, recommended) - 1.5.0beta05.tar.gz - 1.5.0beta05.tar.bz2 + 1.4.1beta11.tar.xz (LZMA-compressed, recommended) + 1.4.1beta11.tar.gz + 1.4.1beta11.tar.bz2 Source files with CRLF line endings (for Windows), without the "configure" script - lp150b05.zip - lp150b05.7z + lp141b11.zip + lp141b11.7z Other information: - 1.5.0beta05-README.txt - 1.5.0beta05-LICENSE.txt + 1.4.1beta11-README.txt + 1.4.1beta11-LICENSE.txt -Changes since the last public release (1.4.1): +Changes since the last public release (1.4.0): -version 1.5.0beta01 [February 7, 2010] - Moved declaration of png_struct into private pngstruct.h and png_info - into pnginfo.h +version 1.4.1beta01 [January 10, 2010] + Updated CMakeLists.txt for consistent indentation and to avoid an + unclosed if-statement warning (Philip Lowman). + Revised Makefile.am and Makefile.in to remove references to Y2KINFO, + KNOWNBUG, and libpng.la (Robert Schwebel). + Revised the makefiles to install the same files and symbolic + links as configure, except for libpng.la and libpng14.la. + Make png_set|get_compression_buffer_size() available even when + PNG_WRITE_SUPPORTED is not enabled. + Revised Makefile.am and Makefile.in to simplify their maintenance. + Revised scripts/makefile.linux to install a link to libpng14.so.14.1 -version 1.5.0beta02 [February 7, 2010] +version 1.4.1beta02 [January 9, 2010] + Revised the rest of the makefiles to install a link to libpng14.so.14.1 + +version 1.4.1beta03 [January 10, 2010] + Removed png_set_premultiply_alpha() from scripts/*.def + +version 1.4.1rc01 [January 16, 2010] + No changes. + +version 1.4.1beta04 [January 23, 2010] + Revised png_decompress_chunk() to improve speed and memory usage when + decoding large chunks. + Added png_set|get_chunk_malloc_max() functions. + +version 1.4.1beta05 [January 26, 2010] + Relocated "int k" declaration in pngtest.c to minimize its scope. + +version 1.4.1beta06 [January 28, 2010] + Revised png_decompress_chunk() to use a two-pass method suggested by + John Bowler. + +version 1.4.1beta07 [February 6, 2010] + Folded some long lines in the source files. + Added defineable PNG_USER_CHUNK_CACHE_MAX and PNG_USER_CHUNK_MALLOC_MAX + Eliminated use of png_ptr->irowbytes and reused the slot in png_ptr as + png_ptr->png_user_chunk_malloc_max. + Revised png_push_save_buffer() to do fewer but larger png_malloc() calls. + +version 1.4.1beta08 [February 6, 2010] + Minor cleanup and updating of dates and copyright year. + +version 1.4.1beta09 [February 7, 2010] Reverted to original png_push_save_buffer() code. -version 1.5.0beta03 [February 8, 2010] - Return allocated "old_buffer" in png_push_save_buffer() before - calling png_error(). - Updated configure script to use SO number 15. +version 1.4.1beta10 [February 9, 2010] + Return allocated "old_buffer" in png_push_save_buffer() before calling + png_error(), to avoid a potential memory leak. -version 1.5.0beta04 [February 9, 2010] - Removed malformed "incomplete struct declaration" of png_info from png.h - -version 1.5.0beta05 [February 9, 2010] - Removed PNG_DEPSTRUCT markup in pngstruct.h and pnginfo.h, and undid the - linewrapping that it entailed. - Revised comments in pngstruct.h and pnginfo.h and added pointers to - the libpng license. - Changed PNG_INTERNAL to PNG_EXPOSE_INTERNAL_STRUCTURES +version 1.4.1beta11 [February 12, 2010] Removed the cbuilder5 project, which has not been updated to 1.4.0. + Removed unused "buffer_size" variable from png_decompress_chunk(). + Relocated misplaced closing curley bracket in png_decompress_chunk(). + Send comments/corrections/commendations to png-mng-implement at lists.sf.net (subscription required; visit diff --git a/CHANGES b/CHANGES index 5d23b9ecd..1c3c702ed 100644 --- a/CHANGES +++ b/CHANGES @@ -2412,8 +2412,8 @@ version 1.4.0beta107 [December 4, 2009] Revised scripts/makefile.netbsd, makefile.openbsd, and makefile.sco to put png.h and pngconf.h in $prefix/include, like the other scripts, instead of in $prefix/include/libpng. Also revised makefile.sco - to put them in $prefix/include/libpng15 instead of in - $prefix/include/libpng/libpng15. + to put them in $prefix/include/libpng14 instead of in + $prefix/include/libpng/libpng14. version 1.4.0beta108 [December 11, 2009] Removed leftover "-DPNG_CONFIGURE_LIBPNG" from contrib/pngminim/*/makefile @@ -2502,30 +2502,20 @@ version 1.4.1beta07 [February 6, 2010] version 1.4.1beta08 [February 6, 2010] Minor cleanup and updating of dates and copyright year. - -version 1.5.0beta01 [February 7, 2010] - Moved declaration of png_struct into private pngstruct.h and png_info - into pnginfo.h - -version 1.4.1beta09 and 1.5.0beta02 [February 7, 2010] +version 1.4.1beta09 [February 7, 2010] Reverted to original png_push_save_buffer() code. -version 1.4.1beta10 and 1.5.0beta03 [February 8, 2010] - Return allocated "old_buffer" in png_push_save_buffer() before - calling png_error(), to avoid a potential memory leak. - Updated configure script to use SO number 15. +version 1.4.1beta10 [February 9, 2010] + Return allocated "old_buffer" in png_push_save_buffer() before calling + png_error(), to avoid a potential memory leak. -version 1.5.0beta04 [February 9, 2010] - Removed malformed "incomplete struct declaration" of png_info from png.h - -version 1.5.0beta05 [February 9, 2010] - Removed PNG_DEPSTRUCT markup in pngstruct.h and pnginfo.h, and undid the - linewrapping that it entailed. - Revised comments in pngstruct.h and pnginfo.h and added pointers to - the libpng license. - Changed PNG_INTERNAL to PNG_EXPOSE_INTERNAL_STRUCTURES +version 1.4.1beta11 [February 12, 2010] + Relocated misplaced closing curley bracket in png_decompress_chunk(). + Removed unused "buffer_size" variable from png_decompress_chunk(). Removed the cbuilder5 project, which has not been updated to 1.4.0. +version 1.4.1rc02 [February 12, 2010] + Send comments/corrections/commendations to png-mng-implement at lists.sf.net (subscription required; visit https://lists.sourceforge.net/lists/listinfo/png-mng-implement diff --git a/pngrutil.c b/pngrutil.c index 543384de1..986755385 100644 --- a/pngrutil.c +++ b/pngrutil.c @@ -1,7 +1,7 @@ /* pngrutil.c - utilities to read a PNG file * - * Last changed in libpng 1.5.0 [February 9, 2010] + * Last changed in libpng 1.4.1 [February 12, 2010] * Copyright (c) 1998-2010 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.) @@ -14,7 +14,6 @@ * libpng itself during the course of reading an image. */ -#define PNG_EXPOSE_INTERNAL_STRUCTURES #define PNG_NO_PEDANTIC_WARNINGS #include "png.h" #ifdef PNG_READ_SUPPORTED @@ -285,7 +284,7 @@ png_decompress_chunk(png_structp png_ptr, int comp_type, png_size_t text_size; png_size_t expanded_size; - expanded_size= png_measure_decompressed_chunk(png_ptr, comp_type, + expanded_size = png_measure_decompressed_chunk(png_ptr, comp_type, chunklength, prefix_size); if (expanded_size == 0) { @@ -296,7 +295,6 @@ png_decompress_chunk(png_structp png_ptr, int comp_type, if (comp_type == PNG_COMPRESSION_TYPE_BASE) { int ret = Z_OK; - png_size_t buffer_size; png_ptr->zstream.next_in = (png_bytep)(png_ptr->chunkdata + prefix_size); png_ptr->zstream.avail_in = (uInt)(chunklength - prefix_size); @@ -305,7 +303,6 @@ png_decompress_chunk(png_structp png_ptr, int comp_type, text_size = 0; text = NULL; - buffer_size = 0; while (png_ptr->zstream.avail_in) { @@ -325,7 +322,7 @@ png_decompress_chunk(png_structp png_ptr, int comp_type, text = (png_charp)png_malloc_warn(png_ptr, text_size); if (text == NULL) { - png_warning(png_ptr, + png_error(png_ptr, "Not enough memory to decompress chunk"); text_size = 0; break; @@ -343,7 +340,6 @@ png_decompress_chunk(png_structp png_ptr, int comp_type, text_size = png_sizeof(msg); png_memcpy(text + prefix_size, msg, text_size); - buffer_size = text_size; break; } if (!png_ptr->zstream.avail_out || ret == Z_STREAM_END) @@ -355,7 +351,7 @@ png_decompress_chunk(png_structp png_ptr, int comp_type, text = (png_charp)png_malloc_warn(png_ptr, text_size + 1); if (text == NULL) { - png_warning(png_ptr, + png_error(png_ptr, "Not enough memory to decompress chunk"); text_size = 0; break; @@ -364,16 +360,15 @@ png_decompress_chunk(png_structp png_ptr, int comp_type, text_size - prefix_size); png_memcpy(text, png_ptr->chunkdata, prefix_size); *(text + text_size) = 0x00; - buffer_size = text_size; } - } - if (ret == Z_STREAM_END) - break; + if (ret == Z_STREAM_END) + break; - else - { - png_ptr->zstream.next_out = png_ptr->zbuf; - png_ptr->zstream.avail_out = (uInt)png_ptr->zbuf_size; + else + { + png_ptr->zstream.next_out = png_ptr->zbuf; + png_ptr->zstream.avail_out = (uInt)png_ptr->zbuf_size; + } } } @@ -410,13 +405,11 @@ png_decompress_chunk(png_structp png_ptr, int comp_type, { png_free(png_ptr, png_ptr->chunkdata); png_ptr->chunkdata = NULL; - png_warning(png_ptr, "Not enough memory for text"); + png_error(png_ptr, "Not enough memory for text"); } - else - png_memcpy(text, png_ptr->chunkdata, prefix_size); + png_memcpy(text, png_ptr->chunkdata, prefix_size); } - if (text != NULL) - *(text + text_size) = 0x00; + *(text + text_size) = 0x00; } inflateReset(&png_ptr->zstream);