* [libnftables PATCH] expr: bitwise: xml_parse: fix casting
@ 2013-06-15 0:36 Arturo Borrero
2013-06-17 19:20 ` Pablo Neira Ayuso
0 siblings, 1 reply; 2+ messages in thread
From: Arturo Borrero @ 2013-06-15 0:36 UTC (permalink / raw)
To: netfilter-devel; +Cc: pablo
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@gmail.com>
---
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;
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [libnftables PATCH] expr: bitwise: xml_parse: fix casting
2013-06-15 0:36 [libnftables PATCH] expr: bitwise: xml_parse: fix casting Arturo Borrero
@ 2013-06-17 19:20 ` Pablo Neira Ayuso
0 siblings, 0 replies; 2+ messages in thread
From: Pablo Neira Ayuso @ 2013-06-17 19:20 UTC (permalink / raw)
To: Arturo Borrero; +Cc: netfilter-devel
On Sat, Jun 15, 2013 at 02:36:13AM +0200, Arturo Borrero wrote:
> Not calling e->data when doing the casting causes memory corruption: segfault.
>
> This was introduced at: 51370f0eedb1c8167ab2c340d2a53f0d9f02509c (src: add support for XML parsing)
Please, next time use the short commit ID that you can get via
git log --oneline.
Applied, thanks.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2013-06-17 19:20 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-06-15 0:36 [libnftables PATCH] expr: bitwise: xml_parse: fix casting Arturo Borrero
2013-06-17 19:20 ` Pablo Neira Ayuso
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.