Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F110022594
D45769.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
615 B
Referenced Files
None
Subscribers
None
D45769.diff
View Options
diff --git a/sbin/dhclient/dispatch.c b/sbin/dhclient/dispatch.c
--- a/sbin/dhclient/dispatch.c
+++ b/sbin/dhclient/dispatch.c
@@ -76,7 +76,6 @@
{
struct ifaddrs *ifap, *ifa;
struct ifreq *tif;
- int len = IFNAMSIZ + sizeof(struct sockaddr_storage);
if (getifaddrs(&ifap) != 0)
error("getifaddrs failed");
@@ -119,7 +118,7 @@
LLADDR(foo), foo->sdl_alen);
}
if (!iface->ifp) {
- if ((tif = calloc(1, len)) == NULL)
+ if ((tif = calloc(1, sizeof(struct ifreq))) == NULL)
error("no space to remember ifp");
strlcpy(tif->ifr_name, ifa->ifa_name, IFNAMSIZ);
iface->ifp = tif;
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Thu, Feb 13, 3:10 PM (21 h, 20 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
16629190
Default Alt Text
D45769.diff (615 B)
Attached To
Mode
D45769: dhclient: correct struct ifreq allocation
Attached
Detach File
Event Timeline
Log In to Comment