summaryrefslogtreecommitdiff
path: root/src/db.c
diff options
context:
space:
mode:
authorPaul Moore <paul@paul-moore.com>2019-03-04 18:46:41 -0500
committerPaul Moore <paul@paul-moore.com>2019-03-04 18:46:41 -0500
commiteb0b248c7aed8e314d6a8d4cdbe28f3980d9b7d3 (patch)
tree54b809f657b4e3c212c7c3a8d09716f6ad090963 /src/db.c
parentf804399e6d90ae34b7c1f505702a1ab2f7f33c18 (diff)
downloadlibseccomp-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>
Diffstat (limited to 'src/db.c')
-rw-r--r--src/db.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/db.c b/src/db.c
index 596dbcd..da0dc16 100644
--- a/src/db.c
+++ b/src/db.c
@@ -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);