Signed-off-by: Jan Engelhardt <jengelh@xxxxxxxxxx> --- src/libnetfilter_cttimeout.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/src/libnetfilter_cttimeout.c b/src/libnetfilter_cttimeout.c index 707543a..1f7c63e 100644 --- a/src/libnetfilter_cttimeout.c +++ b/src/libnetfilter_cttimeout.c @@ -177,7 +177,8 @@ nfct_timeout_attr_set(struct nfct_timeout *t, uint32_t type, const void *data) { switch(type) { case NFCT_TIMEOUT_ATTR_NAME: - strncpy(t->name, data, 32); + strncpy(t->name, data, sizeof(t->name)); + t->name[sizeof(t->name)-1] = '\0'; break; case NFCT_TIMEOUT_ATTR_L3PROTO: t->l3num = *((uint16_t *) data); -- 1.7.7 -- To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html