[libpng16] Imported from libpng-1.6.24beta02.tar

This commit is contained in:
Glenn Randers-Pehrson
2016-06-23 10:58:24 -05:00
parent da2ba024a5
commit 4b4a9583b4
24 changed files with 111 additions and 128 deletions

View File

@@ -2448,7 +2448,7 @@ png_write_find_filter(png_structrp png_ptr, png_row_infop row_info)
/* Overflow can occur in the calculation, just select the lowest set
* filter.
*/
filter_to_do &= 0U-filter_to_do;
filter_to_do &= -filter_to_do;
}
else if ((filter_to_do & PNG_FILTER_NONE) != 0 &&
filter_to_do != PNG_FILTER_NONE)
@@ -2477,7 +2477,9 @@ png_write_find_filter(png_structrp png_ptr, png_row_infop row_info)
/* It's the only filter so no testing is needed */
{
/* Passing PNG_SIZE_MAX here and below prevents the 'setup' function
* breaking out of the loop when lmins is exceeded.
* breaking out of the loop when lmins is exceeded. Optimizing
* compilers should notice that we don't use the returned sum, and
* therefore 'setup' should refrain from calculating and returning "sum".
*/
(void) png_setup_sub_row(png_ptr, bpp, row_bytes, PNG_SIZE_MAX);
best_row = png_ptr->try_row;