mirror of
https://git.code.sf.net/p/libpng/code.git
synced 2025-07-10 18:04:09 +02:00
[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:
2
pngset.c
2
pngset.c
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user