From: Arturo Borrero <arturo.borrero.glez@gmail.com>
To: netfilter-devel@vger.kernel.org
Cc: pablo@netfilter.org
Subject: [libnftables PATCH] expr: bitwise: xml_parse: fix casting
Date: Sat, 15 Jun 2013 02:36:13 +0200 [thread overview]
Message-ID: <20130615003613.27171.26876.stgit@nfdev.cica.es> (raw)
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;
next reply other threads:[~2013-06-15 0:36 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-06-15 0:36 Arturo Borrero [this message]
2013-06-17 19:20 ` [libnftables PATCH] expr: bitwise: xml_parse: fix casting Pablo Neira Ayuso
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20130615003613.27171.26876.stgit@nfdev.cica.es \
--to=arturo.borrero.glez@gmail.com \
--cc=netfilter-devel@vger.kernel.org \
--cc=pablo@netfilter.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).