[server] make sure exp buffer does not contain closing '*' chars (from @oneru)
This commit is contained in:
parent
a554f0d685
commit
f42aeb39dc
@ -1683,6 +1683,9 @@ rm_expired_rules(const fko_srv_options_t * const opts,
|
||||
tmp_mark = ndx;
|
||||
|
||||
strlcpy(exp_str, ndx, sizeof(exp_str));
|
||||
if (strchr(exp_str, '*') != NULL)
|
||||
strchr(exp_str, '*')[0] = '\0';
|
||||
|
||||
chop_spaces(exp_str);
|
||||
if(!is_digits(exp_str))
|
||||
{
|
||||
@ -1888,7 +1891,6 @@ check_firewall_rules(const fko_srv_options_t * const opts,
|
||||
|
||||
continue;
|
||||
}
|
||||
|
||||
rm_expired_rules(opts, fw_output_buf, ndx, ch, i, now);
|
||||
}
|
||||
|
||||
|
||||
@ -1672,6 +1672,9 @@ rm_expired_rules(const fko_srv_options_t * const opts,
|
||||
tmp_mark = ndx;
|
||||
|
||||
strlcpy(exp_str, ndx, sizeof(exp_str));
|
||||
if (strchr(exp_str, '*') != NULL)
|
||||
strchr(exp_str, '*')[0] = '\0';
|
||||
|
||||
chop_spaces(exp_str);
|
||||
if(!is_digits(exp_str))
|
||||
{
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user