From: Pablo Neira Ayuso <pablo@netfilter.org>
To: Alvaro Neira Ayuso <alvaroneay@gmail.com>
Cc: netfilter-devel@vger.kernel.org
Subject: Re: [libnftnl PATCH] mxml: test if the root node name is initialized before to compare it.
Date: Tue, 3 Mar 2015 00:35:04 +0100 [thread overview]
Message-ID: <20150302233504.GA5166@salvia> (raw)
In-Reply-To: <1425326318-22936-1-git-send-email-alvaroneay@gmail.com>
On Mon, Mar 02, 2015 at 08:58:38PM +0100, Alvaro Neira Ayuso wrote:
> If the root node name is not correctly initialized, we have a crash.
Under what circunstances may tree->value.opaque be NULL?
> ---
> src/mxml.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/src/mxml.c b/src/mxml.c
> index 0001ba0..b68f86f 100644
> --- a/src/mxml.c
> +++ b/src/mxml.c
> @@ -43,7 +43,8 @@ mxml_node_t *nft_mxml_build_tree(const void *data, const char *treename,
> goto err;
> }
>
> - if (strcmp(tree->value.opaque, treename) == 0)
> + if (tree->value.opaque != NULL &&
> + strcmp(tree->value.opaque, treename) == 0)
> return tree;
>
> err->error = NFT_PARSE_EMISSINGNODE;
> --
> 1.7.10.4
>
> --
> To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2015-03-02 23:31 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-03-02 19:58 [libnftnl PATCH] mxml: test if the root node name is initialized before to compare it Alvaro Neira Ayuso
2015-03-02 23:35 ` Pablo Neira Ayuso [this message]
2015-03-03 13:45 ` Álvaro Neira Ayuso
2015-03-04 19:03 ` Pablo Neira Ayuso
2015-03-04 19:20 ` Pablo Neira Ayuso
2015-03-04 20:25 ` Álvaro Neira Ayuso
2015-03-05 20:52 ` 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=20150302233504.GA5166@salvia \
--to=pablo@netfilter.org \
--cc=alvaroneay@gmail.com \
--cc=netfilter-devel@vger.kernel.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 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.