mirror of
https://git.code.sf.net/p/libpng/code.git
synced 2025-07-10 18:04:09 +02:00
[libpng15] Fixed an out-of-range read in png_check_keyword() (Bug report
from Qixue Xiao).
This commit is contained in:
@@ -1580,7 +1580,7 @@ png_check_keyword(png_structp png_ptr, png_const_charp key, png_charpp new_key)
|
||||
{
|
||||
png_warning(png_ptr, "trailing spaces removed from keyword");
|
||||
|
||||
while (*kp == ' ')
|
||||
while (key_len && *kp == ' ')
|
||||
{
|
||||
*(kp--) = '\0';
|
||||
key_len--;
|
||||
|
||||
Reference in New Issue
Block a user