summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPablo Neira Ayuso <pablo@netfilter.org>2012-02-05 19:43:21 +0100
committerPablo Neira Ayuso <pablo@netfilter.org>2012-02-06 23:44:06 +0100
commitd9e5402accb761e47e72fab3bdd715d8b365bf73 (patch)
treef518901af495761e92c3ec0b5121af4a8b9e3f52
parent678ec919ffe3072468cb56de6eabf8cb8f7e9bdb (diff)
expect: CTA_EXPECT_HELP_NAME must be NULL-terminated
Make sure this attribute is a NULL-terminated string, otherwise we hit EINVAL if we set this attribute. Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
-rw-r--r--src/expect/build.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/expect/build.c b/src/expect/build.c
index a544ded..d480fad 100644
--- a/src/expect/build.c
+++ b/src/expect/build.c
@@ -39,7 +39,7 @@ static void __build_helper_name(struct nfnlhdr *req, size_t size,
const struct nf_expect *exp)
{
nfnl_addattr_l(&req->nlh, size, CTA_EXPECT_HELP_NAME,
- exp->helper_name, strlen(exp->helper_name));
+ exp->helper_name, strlen(exp->helper_name)+1);
}
static void __build_expectfn(struct nfnlhdr *req,