Lines 401-408
Link Here
|
401 |
{ |
401 |
{ |
402 |
/* Success (maybe) - really uncompress the chunk. */ |
402 |
/* Success (maybe) - really uncompress the chunk. */ |
403 |
png_size_t new_size = 0; |
403 |
png_size_t new_size = 0; |
404 |
png_charp text = png_malloc_warn(png_ptr, |
404 |
png_charp text = NULL; |
405 |
prefix_size + expanded_size + 1); |
405 |
/* Need to check for both truncation (64-bit platforms) and integer |
|
|
406 |
* overflow. |
407 |
*/ |
408 |
if (prefix_size + expanded_size > prefix_size && |
409 |
prefix_size + expanded_size < 0xffffffffU) |
410 |
{ |
411 |
text = png_malloc_warn(png_ptr, prefix_size + expanded_size + 1); |
412 |
} |
406 |
|
413 |
|
407 |
if (text != NULL) |
414 |
if (text != NULL) |
408 |
{ |
415 |
{ |