mirror of
https://gitlab.com/apparmor/apparmor.git
synced 2025-03-04 08:24:42 +01:00
parser: only use 32 bit next/check tables if required
If the state machine does not requires more than 2^16 states use the dfa16 encoding for next/check tables to keep the dfa size small. Bug: https://gitlab.com/apparmor/apparmor/-/issues/419 Signed-off-by: John Johansen <john.johansen@canonical.com>
This commit is contained in:
parent
f86fda02f5
commit
012dcb6489
1 changed files with 2 additions and 1 deletions
|
@ -489,7 +489,8 @@ void flex_table_serialize(CHFA &chfa, ostream &os,
|
|||
|
||||
void CHFA::flex_table(ostream &os, optflags const &opts) {
|
||||
|
||||
if (opts.control & CONTROL_DFA_STATE32) {
|
||||
if (opts.control & CONTROL_DFA_STATE32 &&
|
||||
default_base.size() > (1 << 16) - 1) {
|
||||
// TODO: implement support for flags in separate table
|
||||
// if (opts.control & CONTROL_DFA_FLAGS_TABLE) {
|
||||
// if (opts.dump & DUMP_FLAGS_TABLE)
|
||||
|
|
Loading…
Add table
Reference in a new issue