netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Pablo Neira Ayuso <pablo@netfilter.org>
To: netfilter-devel@vger.kernel.org
Cc: kaber@trash.net
Subject: [PATCH nft 2/3] payload: fix crash when wrong ethernet protocol type is used
Date: Wed, 15 Jan 2014 21:30:22 +0100	[thread overview]
Message-ID: <1389817823-7251-2-git-send-email-pablo@netfilter.org> (raw)
In-Reply-To: <1389817823-7251-1-git-send-email-pablo@netfilter.org>

nft add rule ip filter output meta protocol xyz counter
                                            ^^^

This fix is similar to 4097ad7 ("meta: fix crash when parsing
unresolvable mark values").

Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
---
 src/payload.c |    1 +
 1 file changed, 1 insertion(+)

diff --git a/src/payload.c b/src/payload.c
index 86d75fa..decfcd6 100644
--- a/src/payload.c
+++ b/src/payload.c
@@ -993,6 +993,7 @@ static struct error_record *ethertype_parse(const struct expr *sym,
 {
 	struct error_record *erec;
 
+	*res = NULL;
 	erec = sym->dtype->basetype->parse(sym, res);
 	if (erec != NULL)
 		return erec;
-- 
1.7.10.4


  reply	other threads:[~2014-01-15 20:30 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-01-15 20:30 [PATCH nft 1/3] parser: fix parsing of ethernet protocol types Pablo Neira Ayuso
2014-01-15 20:30 ` Pablo Neira Ayuso [this message]
2014-01-16 16:29   ` [PATCH nft 2/3] payload: fix crash when wrong ethernet protocol type is used Patrick McHardy
2014-01-15 20:30 ` [PATCH nft 3/3] payload: fix inconsistency in ethertype output Pablo Neira Ayuso
2014-01-16 16:32   ` Patrick McHardy
2014-01-16 16:28 ` [PATCH nft 1/3] parser: fix parsing of ethernet protocol types Patrick McHardy
2014-01-16 16:49   ` Pablo Neira Ayuso
2014-01-16 16:51     ` Patrick McHardy

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=1389817823-7251-2-git-send-email-pablo@netfilter.org \
    --to=pablo@netfilter.org \
    --cc=kaber@trash.net \
    --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 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).