Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F151506577
D54752.id.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
485 B
Referenced Files
None
Subscribers
None
D54752.id.diff
View Options
diff --git a/sbin/ifconfig/af_link.c b/sbin/ifconfig/af_link.c
--- a/sbin/ifconfig/af_link.c
+++ b/sbin/ifconfig/af_link.c
@@ -134,7 +134,7 @@
sdl->sdl_alen != ETHER_ADDR_LEN)
return;
- strncpy(ifr.ifr_name, ifa->ifa_name, sizeof(ifr.ifr_name));
+ strlcpy(ifr.ifr_name, ifa->ifa_name, sizeof(ifr.ifr_name));
memcpy(&ifr.ifr_addr, ifa->ifa_addr, sizeof(ifa->ifa_addr->sa_len));
ifr.ifr_addr.sa_family = AF_LOCAL;
if ((sock_hw = socket(AF_LOCAL, SOCK_DGRAM, 0)) < 0) {
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Thu, Apr 9, 9:48 PM (3 h, 31 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
27699740
Default Alt Text
D54752.id.diff (485 B)
Attached To
Mode
D54752: ifconfig: Use strlcpy() instead of strncpy() for interface name copy
Attached
Detach File
Event Timeline
Log In to Comment