[devel] Fixed incorrect test in new png_push_save_buffer() code.

This commit is contained in:
Glenn Randers-Pehrson 2010-02-07 19:49:07 -06:00
parent e3f3c4ea0b
commit c40df89cef
3 changed files with 24 additions and 14 deletions

View File

@ -1,5 +1,5 @@
Libpng 1.5.0beta01 - February 8, 2010
Libpng 1.5.0beta02 - February 8, 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,25 +9,29 @@ Files available for download:
Source files with LF line endings (for Unix/Linux) and with a
"configure" script
1.5.0beta01.tar.xz (LZMA-compressed, recommended)
1.5.0beta01.tar.gz
1.5.0beta01.tar.bz2
1.5.0beta02.tar.xz (LZMA-compressed, recommended)
1.5.0beta02.tar.gz
1.5.0beta02.tar.bz2
Source files with CRLF line endings (for Windows), without the
"configure" script
lp150b01.zip
lp150b01.7z
lp150b02.zip
lp150b02.7z
Other information:
1.5.0beta01-README.txt
1.5.0beta01-LICENSE.txt
1.5.0beta02-README.txt
1.5.0beta02-LICENSE.txt
Changes since the last public release (1.4.1):
version 1.5.0beta01 [February 8, 2010]
Moved declaration of png_struct into private pngstruct.h and png_info into pnginfo.h
version 1.5.0beta01 [February 7, 2010]
Moved declaration of png_struct into private pngstruct.h and png_info
into pnginfo.h
version 1.5.0beta02 [February 8, 2010]
Fixed incorrect test in new png_push_save_buffer() code.
Send comments/corrections/commendations to png-mng-implement at lists.sf.net
(subscription required; visit

View File

@ -2502,8 +2502,12 @@ 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 8, 2010]
Moved declaration of png_struct into private pngstruct.h and png_info into pnginfo.h
version 1.5.0beta01 [February 7, 2010]
Moved declaration of png_struct into private pngstruct.h and png_info
into pnginfo.h
version 1.5.0beta02 [February 8, 2010]
Fixed incorrect test in new png_push_save_buffer() code.
Send comments/corrections/commendations to png-mng-implement at lists.sf.net
(subscription required; visit

View File

@ -693,7 +693,9 @@ png_push_save_buffer(png_structp png_ptr)
png_size_t new_max;
png_bytep old_buffer;
if (png_ptr->save_buffer_size == PNG_SIZE_MAX)
if (png_ptr->save_buffer_max == PNG_SIZE_MAX ||
(png_ptr->save_buffer_size > PNG_SIZE_MAX -
png_ptr->current_buffer_size))
png_error(png_ptr, "Overflow of save_buffer");
if (png_ptr->save_buffer_size > PNG_SIZE_MAX -