From: Patrick McHardy Date: Tue, 18 Dec 2007 05:52:35 +0000 (-0800) Subject: [NETFILTER]: ip6_tables: fix stack leagage X-Git-Tag: MMI-PSA29.97-13-9~37648^2~1034 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=b5dd674b2a1de5925955a088b0a10f81484e975a;p=GitHub%2FMotorolaMobilityLLC%2Fkernel-slsi.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;