mirror of
https://github.com/weechat/weechat.git
synced 2026-06-26 21:06:38 +02:00
core: check error ERANGE after call to strtoull in function util_parse_delay
This commit is contained in:
@@ -773,9 +773,10 @@ util_parse_delay (const char *string_delay, unsigned long long default_factor,
|
||||
if (!str_number)
|
||||
return 0;
|
||||
|
||||
errno = 0;
|
||||
error = NULL;
|
||||
*delay = strtoull (str_number, &error, 10);
|
||||
if (!error || error[0])
|
||||
if ((errno == ERANGE) || !error || error[0])
|
||||
{
|
||||
free (str_number);
|
||||
*delay = 0;
|
||||
|
||||
Reference in New Issue
Block a user