From: Patrick McHardy Date: Tue, 18 Dec 2007 05:52:35 +0000 (-0800) Subject: [NETFILTER]: ip6_tables: fix stack leagage X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=b5dd674b2a1de5925955a088b0a10f81484e975a;p=openwrt%2Fstaging%2Fblogic.git [NETFILTER]: ip6_tables: fix stack leagage Fix leakage of local variable on stack. This already got fixed in ip_tables silently by the compat patches. Signed-off-by: Patrick McHardy Signed-off-by: David S. Miller --- diff --git a/net/ipv6/netfilter/ip6_tables.c b/net/ipv6/netfilter/ip6_tables.c index 40893fc05926..fc4c62fddfe7 100644 --- a/net/ipv6/netfilter/ip6_tables.c +++ b/net/ipv6/netfilter/ip6_tables.c @@ -1154,7 +1154,7 @@ static int get_info(void __user *user, int *len, int compat) sizeof(info.underflow)); info.num_entries = private->number; info.size = private->size; - memcpy(info.name, name, sizeof(info.name)); + strcpy(info.name, name); if (copy_to_user(user, &info, *len) != 0) ret = -EFAULT;