mirror of
https://git.code.sf.net/p/libpng/code.git
synced 2025-07-10 18:04:09 +02:00
[libpng17] Use "1U" not "1" in pointer calculations in png_handle_sPLT().
This commit is contained in:
parent
d3c0359b23
commit
57e92a8432
@ -1530,7 +1530,7 @@ png_handle_sPLT(png_structrp png_ptr, png_inforp info_ptr)
|
|||||||
++entry_start;
|
++entry_start;
|
||||||
|
|
||||||
/* A sample depth should follow the separator, and we should be on it */
|
/* A sample depth should follow the separator, and we should be on it */
|
||||||
if (length < 2 || entry_start - buffer > length - 2)
|
if (length < 2 || entry_start > buffer + (length - 2U))
|
||||||
{
|
{
|
||||||
png_chunk_benign_error(png_ptr, "malformed");
|
png_chunk_benign_error(png_ptr, "malformed");
|
||||||
return;
|
return;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user