Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F153390415
D14912.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
751 B
Referenced Files
None
Subscribers
None
D14912.diff
View Options
Index: head/sys/net/if.c
===================================================================
--- head/sys/net/if.c
+++ head/sys/net/if.c
@@ -3129,10 +3129,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)) {
@@ -3166,7 +3166,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
Tue, Apr 21, 9:28 PM (2 h, 48 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
31869163
Default Alt Text
D14912.diff (751 B)
Attached To
Mode
D14912: ifconf(): Always zero the whole struct ifreq.
Attached
Detach File
Event Timeline
Log In to Comment