if (thd_objs == nullptr)
return -1;
+ if (config->gen_id >= THD_MAX_GENID)
+ return -1;
+
if (thd_objs->sfthd_garray[policy_id] == nullptr)
{
thd_objs->sfthd_garray[policy_id] =
if ( thdx.gen_id == 0 and thdx.sig_id >= 1 )
{
- ParseError("bad or incomplete gid:sid pair [%d]", idx);
+ ParseError("bad or incomplete gid:sid pair");
return false;
}
if ( ( thdx.tracking == 0 and thdx.ip_address ) or ( thdx.tracking > 0 and !thdx.ip_address ) )
{
- ParseError("incomplete pair of track and IP [%d]", idx);
+ ParseError("incomplete pair of track and IP");
return false;
}
if ( sfthreshold_create(sc, sc->threshold_config, &thdx, get_network_policy()->policy_id) )
{
- ParseError("threshold object cannot be created from the given parameters [%d]", idx);
+ ParseError("threshold object cannot be created from the given parameters");
return false;
}