blob: 5cefefd914304917f5ff47193c69e0c4707550b1 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
Index: sys/net/if.c
===================================================================
RCS file: /home/ncvs/src/sys/net/if.c,v
retrieving revision 1.225
diff -u -p -r1.225 if.c
--- sys/net/if.c 20 Mar 2005 14:31:45 -0000 1.225
+++ sys/net/if.c 14 Apr 2005 22:06:17 -0000
@@ -1596,6 +1596,12 @@ again:
TAILQ_FOREACH(ifp, &ifnet, if_link) {
int addrs;
+ /*
+ * Zero the ifr_name buffer to make sure we don't
+ * disclose the contents of the stack.
+ */
+ memset(ifr.ifr_name, 0, sizeof(ifr.ifr_name));
+
if (strlcpy(ifr.ifr_name, ifp->if_xname, sizeof(ifr.ifr_name))
>= sizeof(ifr.ifr_name))
return (ENAMETOOLONG);
|