From d9e5402accb761e47e72fab3bdd715d8b365bf73 Mon Sep 17 00:00:00 2001 From: Pablo Neira Ayuso Date: Sun, 5 Feb 2012 19:43:21 +0100 Subject: 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 --- src/expect/build.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/expect/build.c') 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, -- cgit v1.2.3