Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F163717751
D8445.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
578 B
Referenced Files
None
Subscribers
None
D8445.diff
View Options
Index: head/sbin/dhclient/dispatch.c
===================================================================
--- head/sbin/dhclient/dispatch.c
+++ head/sbin/dhclient/dispatch.c
@@ -106,8 +106,8 @@
if (foo.sin_addr.s_addr == htonl(INADDR_LOOPBACK))
continue;
if (!iface->ifp) {
- int len = IFNAMSIZ + ifa->ifa_addr->sa_len;
- if ((tif = malloc(len)) == NULL)
+ if ((tif = calloc(1, sizeof(struct ifreq)))
+ == NULL)
error("no space to remember ifp");
strlcpy(tif->ifr_name, ifa->ifa_name, IFNAMSIZ);
memcpy(&tif->ifr_addr, ifa->ifa_addr,
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Jul 26, 4:15 PM (59 m, 33 s)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
35544464
Default Alt Text
D8445.diff (578 B)
Attached To
Mode
D8445: Allocate a struct ifreq rather than using a computed size for the BIOCSETIF ioctl.
Attached
Detach File
Event Timeline
Log In to Comment