[server] make sure exp buffer does not contain closing '*' chars (from @oneru)

This commit is contained in:
Michael Rash 2016-04-30 09:27:07 -04:00
parent a554f0d685
commit f42aeb39dc
2 changed files with 6 additions and 1 deletions

View File

@ -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);
}

View File

@ -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))
{