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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user