summaryrefslogtreecommitdiffstats
path: root/src/expr/lookup.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/expr/lookup.c')
-rw-r--r--src/expr/lookup.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/expr/lookup.c b/src/expr/lookup.c
index 0ae93ce..ecc07cb 100644
--- a/src/expr/lookup.c
+++ b/src/expr/lookup.c
@@ -204,6 +204,11 @@ nft_rule_expr_lookup_xml_parse(struct nft_rule_expr *e, char *xml)
return -1;
}
+ if (tmp > NFT_REG_MAX) {
+ mxmlDelete(tree);
+ return -1;
+ }
+
lookup->sreg = (uint32_t)tmp;
e->flags |= (1 << NFT_EXPR_LOOKUP_SREG);
@@ -217,6 +222,11 @@ nft_rule_expr_lookup_xml_parse(struct nft_rule_expr *e, char *xml)
return -1;
}
+ if (tmp > NFT_REG_MAX) {
+ mxmlDelete(tree);
+ return -1;
+ }
+
lookup->dreg = (uint32_t)tmp;
e->flags |= (1 << NFT_EXPR_LOOKUP_DREG);
}