[master] Fixed incorrect typecast of png_get_user_malloc_max() in pngget.c

This commit is contained in:
Glenn Randers-Pehrson 2010-02-14 06:48:09 -06:00
parent 7d6103ad6c
commit 23b9a2fda0
3 changed files with 20 additions and 14 deletions

View File

@ -1,5 +1,5 @@
Libpng 1.4.1beta11 - February 13, 2010 Libpng 1.4.1beta12 - February 14, 2010
This is not intended to be a public release. It will be replaced 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. within a few weeks by a public version or by another test version.
@ -9,20 +9,20 @@ Files available for download:
Source files with LF line endings (for Unix/Linux) and with a Source files with LF line endings (for Unix/Linux) and with a
"configure" script "configure" script
1.4.1beta11.tar.xz (LZMA-compressed, recommended) 1.4.1beta12.tar.xz (LZMA-compressed, recommended)
1.4.1beta11.tar.gz 1.4.1beta12.tar.gz
1.4.1beta11.tar.bz2 1.4.1beta12.tar.bz2
Source files with CRLF line endings (for Windows), without the Source files with CRLF line endings (for Windows), without the
"configure" script "configure" script
lp141b11.zip lp141b12.zip
lp141b11.7z lp141b12.7z
Other information: Other information:
1.4.1beta11-README.txt 1.4.1beta12-README.txt
1.4.1beta11-LICENSE.txt 1.4.1beta12-LICENSE.txt
Changes since the last public release (1.4.0): Changes since the last public release (1.4.0):
@ -76,12 +76,15 @@ version 1.4.1beta10 [February 9, 2010]
Return allocated "old_buffer" in png_push_save_buffer() before calling Return allocated "old_buffer" in png_push_save_buffer() before calling
png_error(), to avoid a potential memory leak. png_error(), to avoid a potential memory leak.
version 1.4.1beta11 [February 13, 2010] version 1.4.1beta11 [February 12, 2010]
Removed the cbuilder5 project, which has not been updated to 1.4.0. Removed the cbuilder5 project, which has not been updated to 1.4.0.
Removed unused "buffer_size" variable from png_decompress_chunk(). Removed unused "buffer_size" variable from png_decompress_chunk().
Relocated misplaced closing curley bracket in png_decompress_chunk(). Relocated misplaced closing curley bracket in png_decompress_chunk().
Complete rewrite of two-pass png_decompress_chunk() by John Bowler. Complete rewrite of two-pass png_decompress_chunk() by John Bowler.
version 1.4.1beta12 [February 14, 2010]
Fixed incorrect typecast of png_get_user_malloc_max() in pngget.c
Send comments/corrections/commendations to png-mng-implement at lists.sf.net Send comments/corrections/commendations to png-mng-implement at lists.sf.net
(subscription required; visit (subscription required; visit

View File

@ -2509,13 +2509,16 @@ version 1.4.1beta10 [February 9, 2010]
Return allocated "old_buffer" in png_push_save_buffer() before calling Return allocated "old_buffer" in png_push_save_buffer() before calling
png_error(), to avoid a potential memory leak. png_error(), to avoid a potential memory leak.
version 1.4.1beta11 [February 13, 2010] version 1.4.1beta11 [February 12, 2010]
Relocated misplaced closing curley bracket in png_decompress_chunk(). Relocated misplaced closing curley bracket in png_decompress_chunk().
Removed unused "buffer_size" variable from 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. Removed the cbuilder5 project, which has not been updated to 1.4.0.
Complete rewrite of two-pass png_decompress_chunk() by John Bowler. Complete rewrite of two-pass png_decompress_chunk() by John Bowler.
version 1.4.1rc02 [February 13, 2010] version 1.4.1beta12 [February 14, 2010]
Fixed incorrect typecast of png_get_user_malloc_max() in pngget.c
version 1.4.1rc02 [February 14, 2010]
Send comments/corrections/commendations to png-mng-implement at lists.sf.net Send comments/corrections/commendations to png-mng-implement at lists.sf.net
(subscription required; visit (subscription required; visit

View File

@ -1,7 +1,7 @@
/* pngget.c - retrieval of values from info struct /* pngget.c - retrieval of values from info struct
* *
* Last changed in libpng 1.4.1 [February 13, 2010] * Last changed in libpng 1.4.1 [February 14, 2010]
* Copyright (c) 1998-2010 Glenn Randers-Pehrson * Copyright (c) 1998-2010 Glenn Randers-Pehrson
* (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger) * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger)
* (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.) * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.)
@ -899,11 +899,11 @@ png_get_chunk_cache_max (png_structp png_ptr)
return (png_ptr? png_ptr->user_chunk_cache_max : 0); return (png_ptr? png_ptr->user_chunk_cache_max : 0);
} }
/* This function was added to libpng 1.4.1 */ /* This function was added to libpng 1.4.1 */
png_uint_32 PNGAPI png_alloc_size_t PNGAPI
png_get_chunk_malloc_max (png_structp png_ptr) png_get_chunk_malloc_max (png_structp png_ptr)
{ {
return (png_ptr? return (png_ptr?
(png_uint_32)png_ptr->user_chunk_malloc_max : 0); png_ptr->user_chunk_malloc_max : 0);
} }
#endif /* ?PNG_SET_USER_LIMITS_SUPPORTED */ #endif /* ?PNG_SET_USER_LIMITS_SUPPORTED */