summaryrefslogtreecommitdiffstats
path: root/kernel/ip_set_core.c
diff options
context:
space:
mode:
authorJozsef Kadlecsik <kadlec@blackhole.kfki.hu>2011-01-14 17:24:38 +0100
committerJozsef Kadlecsik <kadlec@blackhole.kfki.hu>2011-01-14 17:24:38 +0100
commitfac5c2a3607058f61a7d142852d4376bd11bb5ec (patch)
tree0b0a2e743da8ae215e6a00ec7680705cb029fad9 /kernel/ip_set_core.c
parent5473f88e13ae551192fb682c0e23fab49597f71c (diff)
Replace strncpy with strlcpy at creating a set.
Better add more safety nets against user input.
Diffstat (limited to 'kernel/ip_set_core.c')
-rw-r--r--kernel/ip_set_core.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/kernel/ip_set_core.c b/kernel/ip_set_core.c
index 178633e..21cfc0f 100644
--- a/kernel/ip_set_core.c
+++ b/kernel/ip_set_core.c
@@ -556,7 +556,7 @@ ip_set_create(struct sock *ctnl, struct sk_buff *skb,
if (!set)
return -ENOMEM;
rwlock_init(&set->lock);
- strncpy(set->name, name, IPSET_MAXNAMELEN);
+ strlcpy(set->name, name, IPSET_MAXNAMELEN);
atomic_set(&set->ref, 0);
set->family = family;