[libpng15] Change info_ptr->unknown_chunks_num to type png_uint_32

and test against INT_MAX instead of UINT_MAX in pngset.c
This commit is contained in:
Glenn Randers-Pehrson
2013-01-17 10:52:48 -06:00
parent 5b9fe98c5f
commit 77a817bfc2
4 changed files with 16 additions and 10 deletions

View File

@@ -1040,7 +1040,7 @@ png_set_unknown_chunks(png_structp png_ptr,
return;
if (num_unknowns < 0 ||
num_unknowns >= UINT_MAX-info_ptr->unknown_chunks_num ||
num_unknowns >= INT_MAX-info_ptr->unknown_chunks_num ||
num_unknowns >= PNG_SIZE_MAX/png_sizeof(png_unknown_chunk)
- info_ptr->unknown_chunks_num)
np=NULL;