summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFlorian Westphal <fw@strlen.de>2018-01-11 16:30:21 +0100
committerFlorian Westphal <fw@strlen.de>2018-03-17 00:32:41 +0100
commit468ad4be967842dff88e220c17c7e4bcc5c8193b (patch)
tree41751399c57580fa1c50216cc368de2251de7fdd
parente9493a323726da383ffae413d4b526a15ed15142 (diff)
src: netlink_delinearize: don't assume element contains a value
We cannot assume i->key->key is EXPR_VALUE, we could look e.g. at a range, which will trigger an assertion failure in binop_adjust_one(). We should call __binop_adjust recursively again in the EXPR_SET_ELEM case, using key as new input. Fixes: b8b8e7b6ae10 ("evaluate: transfer right shifts to set reference side") Signed-off-by: Florian Westphal <fw@strlen.de>
-rw-r--r--src/netlink_delinearize.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/netlink_delinearize.c b/src/netlink_delinearize.c
index 997fb53b..b20047f1 100644
--- a/src/netlink_delinearize.c
+++ b/src/netlink_delinearize.c
@@ -1648,7 +1648,7 @@ static void __binop_adjust(const struct expr *binop, struct expr *right,
binop_adjust_one(binop, i->key->right, shift);
break;
case EXPR_SET_ELEM:
- binop_adjust_one(binop, i->key->key, shift);
+ __binop_adjust(binop, i->key->key, shift);
break;
default:
BUG("unknown expression type %s\n", i->key->ops->name);