[NETFILTER]: ip6_tables: fix stack leagage
authorPatrick McHardy <kaber@trash.net>
Tue, 18 Dec 2007 05:52:35 +0000 (21:52 -0800)
committerDavid S. Miller <davem@davemloft.net>
Mon, 28 Jan 2008 22:58:40 +0000 (14:58 -0800)
Fix leakage of local variable on stack. This already got fixed in
ip_tables silently by the compat patches.

Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv6/netfilter/ip6_tables.c

index 40893fc059263ef9e74057762f31c248a1726821..fc4c62fddfe7faf293339bcd72c617566397809b 100644 (file)
@@ -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;
This page took 0.026036 seconds and 5 git commands to generate.