summaryrefslogtreecommitdiffstats
path: root/src/expr/meta.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/expr/meta.c')
-rw-r--r--src/expr/meta.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/expr/meta.c b/src/expr/meta.c
index 535b456..41fcff1 100644
--- a/src/expr/meta.c
+++ b/src/expr/meta.c
@@ -163,6 +163,11 @@ static int nft_rule_expr_meta_xml_parse(struct nft_rule_expr *e, char *xml)
return -1;
}
+ if (tmp > NFT_REG_MAX) {
+ mxmlDelete(tree);
+ return -1;
+ }
+
meta->dreg = (uint8_t)tmp;
e->flags |= (1 << NFT_EXPR_META_DREG);