1
0
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:
Sébastien Helleu
2026-03-15 10:49:01 +01:00
parent 5147b19e51
commit 83d760deae
2 changed files with 6 additions and 2 deletions
+2 -1
View File
@@ -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;