All of lore.kernel.org
 help / color / mirror / Atom feed
From: Arturo Borrero Gonzalez <arturo.borrero.glez@gmail.com>
To: netfilter-devel@vger.kernel.org
Cc: pablo@netfilter.org
Subject: [libnftables PATCH] ct: fix missing NFT_CT_L3PROTOCOL in ctkey2str_array
Date: Wed, 15 Jan 2014 19:18:46 +0100	[thread overview]
Message-ID: <20140115181846.25192.17850.stgit@nfdev.cica.es> (raw)

Due to missing NFT_CT_L3PROTOCOL key in ctkey2str_array, a segfault is
produced when the str2ctkey() loop reaches that position, since strcmp()
will try to compare a NULL value.

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

diff --git a/src/expr/ct.c b/src/expr/ct.c
index 97f9dcc..e960134 100644
--- a/src/expr/ct.c
+++ b/src/expr/ct.c
@@ -151,6 +151,7 @@ const char *ctkey2str_array[NFT_CT_MAX] = {
 	[NFT_CT_SECMARK]	= "secmark",
 	[NFT_CT_EXPIRATION]	= "expiration",
 	[NFT_CT_HELPER]		= "helper",
+	[NFT_CT_L3PROTOCOL]	= "l3protocol",
 	[NFT_CT_PROTOCOL]	= "protocol",
 	[NFT_CT_SRC]		= "src",
 	[NFT_CT_DST]		= "dst",


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

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-01-15 18:18 Arturo Borrero Gonzalez [this message]
2014-01-16 17:51 ` [libnftables PATCH] ct: fix missing NFT_CT_L3PROTOCOL in ctkey2str_array 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=20140115181846.25192.17850.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 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.