diff options
author | Pablo Neira Ayuso <pablo@netfilter.org> | 2022-10-05 01:36:44 +0200 |
---|---|---|
committer | Pablo Neira Ayuso <pablo@netfilter.org> | 2022-10-06 15:35:23 +0200 |
commit | 77bd7e0c70d9a1914c4a853e09849af724c0f695 (patch) | |
tree | de11f92ef0d561bfac6d479a0712c9be8aa17b7a /src | |
parent | 545edb7a8ef0a8acf991b1b7857fddc24d7b151a (diff) |
evaluate: bogus datatype assertion in binary operation evaluation
Use datatype_equal(), otherwise dynamically allocated datatype fails
to fulfill the datatype pointer check, triggering the assertion:
nft: evaluate.c:1249: expr_evaluate_binop: Assertion `expr_basetype(left) == expr_basetype(right)' failed.
Closes: https://bugzilla.netfilter.org/show_bug.cgi?id=1636
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'src')
-rw-r--r-- | src/evaluate.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/evaluate.c b/src/evaluate.c index a52867b3..2e2b8df0 100644 --- a/src/evaluate.c +++ b/src/evaluate.c @@ -1265,7 +1265,7 @@ static int expr_evaluate_binop(struct eval_ctx *ctx, struct expr **expr) sym, expr_name(right)); /* The grammar guarantees this */ - assert(expr_basetype(left) == expr_basetype(right)); + assert(datatype_equal(expr_basetype(left), expr_basetype(right))); switch (op->op) { case OP_LSHIFT: |