summaryrefslogtreecommitdiff
path: root/networking/traceroute.c
diff options
context:
space:
mode:
Diffstat (limited to 'networking/traceroute.c')
-rw-r--r--networking/traceroute.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/networking/traceroute.c b/networking/traceroute.c
index 29cebfa..5d1baac 100644
--- a/networking/traceroute.c
+++ b/networking/traceroute.c
@@ -447,7 +447,7 @@ ifaddrlist(struct IFADDRLIST **ipaddrp)
* SIOCGIFFLAGS stomps over it because the requests
* are returned in a union.)
*/
- strncpy(ifr.ifr_name, ifrp->ifr_name, sizeof(ifr.ifr_name));
+ strncpy_IFNAMSIZ(ifr.ifr_name, ifrp->ifr_name);
if (ioctl(fd, SIOCGIFFLAGS, (char *)&ifr) < 0) {
if (errno == ENXIO)
continue;