diff options
author | Paul Moore <paul@paul-moore.com> | 2019-03-04 18:46:41 -0500 |
---|---|---|
committer | Paul Moore <paul@paul-moore.com> | 2019-03-04 18:46:41 -0500 |
commit | eb0b248c7aed8e314d6a8d4cdbe28f3980d9b7d3 (patch) | |
tree | 54b809f657b4e3c212c7c3a8d09716f6ad090963 | |
parent | f804399e6d90ae34b7c1f505702a1ab2f7f33c18 (diff) | |
download | libseccomp-eb0b248c7aed8e314d6a8d4cdbe28f3980d9b7d3.tar.gz |
db: bail on a prune operation if both trees have a prefix
If both trees have prefixes that don't match, bail on the prune
operation.
Signed-off-by: Paul Moore <paul@paul-moore.com>
-rw-r--r-- | src/db.c | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -497,6 +497,10 @@ static int _db_tree_prune(struct db_arg_chain_tree **existing, goto prune_return; } } else if (_db_chain_lt(x_iter, n_iter)) { + /* bail if we have a prefix on the new tree */ + if (state->flags & _DB_IST_N_PREFIX) + goto prune_return; + /* check the next level in the existing tree */ if (x_iter->nxt_t) { _db_node_get(x_iter); |