mirror of
https://github.com/mirror/wget.git
synced 2025-01-31 14:50:23 +08:00
* src/init.c (cmd_bytes_sum): Fix integer over- and underflow
This commit is contained in:
parent
15ef79f808
commit
e0860dd1ff
@ -1342,7 +1342,9 @@ static bool
|
||||
cmd_bytes_sum (const char *com, const char *val, void *place)
|
||||
{
|
||||
double byte_value;
|
||||
if (!parse_bytes_helper (val, &byte_value))
|
||||
|
||||
if (!parse_bytes_helper (val, &byte_value)
|
||||
|| byte_value < LONG_MIN || byte_value > LONG_MAX)
|
||||
{
|
||||
fprintf (stderr, _("%s: %s: Invalid byte value %s\n"),
|
||||
exec_name, com, quote (val));
|
||||
|
Loading…
Reference in New Issue
Block a user