Browse Source

[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 <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
Patrick McHardy 17 years ago
parent
commit
b5dd674b2a
1 changed files with 1 additions and 1 deletions
  1. 1 1
      net/ipv6/netfilter/ip6_tables.c

+ 1 - 1
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;