[libnftables PATCH] expr: bitwise: xml_parse: fix casting

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Not calling e->data when doing the casting causes memory corruption: segfault.

This was introduced at: 51370f0eedb1c8167ab2c340d2a53f0d9f02509c (src: add support for XML parsing)

Signed-off-by: Arturo Borrero Gonzalez <arturo.borrero.glez@xxxxxxxxx>
---
 src/expr/bitwise.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/expr/bitwise.c b/src/expr/bitwise.c
index 9ebe3dc..1429483 100644
--- a/src/expr/bitwise.c
+++ b/src/expr/bitwise.c
@@ -200,7 +200,7 @@ static int
 nft_rule_expr_bitwise_xml_parse(struct nft_rule_expr *e, char *xml)
 {
 #ifdef XML_PARSING
-	struct nft_expr_bitwise *bitwise = (struct nft_expr_bitwise *)e;
+	struct nft_expr_bitwise *bitwise = (struct nft_expr_bitwise *)e->data;
 	mxml_node_t *tree = NULL;
 	mxml_node_t *node = NULL;
 	mxml_node_t *save = NULL;

--
To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Netfitler Users]     [LARTC]     [Bugtraq]     [Yosemite Forum]

  Powered by Linux