1
0
mirror of https://github.com/weechat/weechat.git synced 2026-06-25 04:16:38 +02:00

core: check that time is valid in function hdata_set

This commit is contained in:
Sébastien Helleu
2021-11-03 23:23:09 +01:00
parent 60b374901f
commit 13472adfff
+1 -1
View File
@@ -1059,7 +1059,7 @@ hdata_set (struct t_hdata *hdata, void *pointer, const char *name,
case WEECHAT_HDATA_TIME:
error = NULL;
number = strtol (value, &error, 10);
if (error && !error[0])
if (error && !error[0] && (number >= 0))
{
*((time_t *)(pointer + var->offset)) = (time_t)number;
return 1;