Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F103224186
D14912.id40928.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
736 B
Referenced Files
None
Subscribers
None
D14912.id40928.diff
View Options
Index: sys/net/if.c
===================================================================
--- sys/net/if.c
+++ sys/net/if.c
@@ -3122,10 +3122,10 @@
int addrs;
/*
- * Zero the ifr_name buffer to make sure we don't
- * disclose the contents of the stack.
+ * Zero the ifr to make sure we don't disclose the contents
+ * of the stack.
*/
- memset(ifr.ifr_name, 0, sizeof(ifr.ifr_name));
+ memset(&ifr, 0, sizeof(ifr));
if (strlcpy(ifr.ifr_name, ifp->if_xname, sizeof(ifr.ifr_name))
>= sizeof(ifr.ifr_name)) {
@@ -3159,7 +3159,6 @@
}
IF_ADDR_RUNLOCK(ifp);
if (addrs == 0) {
- bzero((caddr_t)&ifr.ifr_addr, sizeof(ifr.ifr_addr));
sbuf_bcat(sb, &ifr, sizeof(ifr));
max_len += sizeof(ifr);
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Nov 23, 9:48 AM (9 h, 25 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
14796837
Default Alt Text
D14912.id40928.diff (736 B)
Attached To
Mode
D14912: ifconf(): Always zero the whole struct ifreq.
Attached
Detach File
Event Timeline
Log In to Comment