[PATCH v3] netfilter/ipset: replace a strncpy() with strscpy()

2018-12-01 Thread Qian Cai
:3: warning: 'strncpy' writing 32 bytes into a region of size 2 overflows the destination [-Wstringop-overflow=] Signed-off-by: Qian Cai --- Changelog: * v2: - Released the lock for the error-path as well. * v1: - Checked the return value. net/netfilter/ipset/ip_set_core.c | 6 -- 1 file

[PATCH v2] netfilter: ipset: replace a strncpy() with strscpy()

2018-11-26 Thread Qian Cai
:3: warning: 'strncpy' writing 32 bytes into a region of size 2 overflows the destination [-Wstringop-overflow=] Signed-off-by: Qian Cai --- Changes since v1: * Checked the return value. net/netfilter/ipset/ip_set_core.c | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git

[PATCH] netfilter: ipset: replace a strncpy() with strscpy()

2018-11-21 Thread Qian Cai
: warning: 'strncpy' writing 32 bytes into a region of size 2 overflows the destination [-Wstringop-overflow=] Signed-off-by: Qian Cai --- net/netfilter/ipset/ip_set_core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/netfilter/ipset/ip_set_core.c b/net/netfilter/ipset