path: root/src/expect/build.c
diff options
authorPablo Neira Ayuso <>2012-02-05 19:43:21 +0100
committerPablo Neira Ayuso <>2012-02-06 23:44:06 +0100
commitd9e5402accb761e47e72fab3bdd715d8b365bf73 (patch)
treef518901af495761e92c3ec0b5121af4a8b9e3f52 /src/expect/build.c
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 <>
Diffstat (limited to 'src/expect/build.c')
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,