Fix missing length check in add_group_characteristic

This commit is contained in:
Madeline Busig 2025-04-29 06:13:52 -07:00
parent 77d7b73365
commit 20db4e7eea

View File

@ -23,6 +23,9 @@ group_id_t ruleset_t::add_group_characteristic(const etl::ivector<token_id_t>& t
if (m_group_characteristics.full()) {
throw mtl::length_error();
}
if (tokens.size() > g_max_cgroup_tokens) {
throw mtl::length_error();
}
m_group_characteristics.push_back(group_characteristic_t());
group_characteristic_t& chr = m_group_characteristics.back();