diff options
| author | Alan Somers <asomers@FreeBSD.org> | 2017-04-07 15:15:10 +0000 |
|---|---|---|
| committer | Alan Somers <asomers@FreeBSD.org> | 2017-04-07 15:15:10 +0000 |
| commit | 2b8aaacea9d03f77f23997bb63a6951e762a9948 (patch) | |
| tree | debcba5dd966bb3d5c923dc3ba580a1be8df03ad /usr.bin/netstat | |
| parent | 22cbd6ef2ec01e233e4cc310bdee9d1a43993737 (diff) | |
Notes
Diffstat (limited to 'usr.bin/netstat')
| -rw-r--r-- | usr.bin/netstat/inet6.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.bin/netstat/inet6.c b/usr.bin/netstat/inet6.c index a8eccc64f352..03a656bb489c 100644 --- a/usr.bin/netstat/inet6.c +++ b/usr.bin/netstat/inet6.c @@ -618,7 +618,7 @@ ip6_ifstats(char *ifname) return; } - strcpy(ifr.ifr_name, ifname); + strlcpy(ifr.ifr_name, ifname, sizeof(ifr.ifr_name)); if (ioctl(s, SIOCGIFSTAT_IN6, (char *)&ifr) < 0) { if (errno != EPFNOSUPPORT) xo_warn("Warning: ioctl(SIOCGIFSTAT_IN6)"); @@ -1079,7 +1079,7 @@ icmp6_ifstats(char *ifname) return; } - strcpy(ifr.ifr_name, ifname); + strlcpy(ifr.ifr_name, ifname, sizeof(ifr.ifr_name)); if (ioctl(s, SIOCGIFSTAT_ICMP6, (char *)&ifr) < 0) { if (errno != EPFNOSUPPORT) xo_warn("Warning: ioctl(SIOCGIFSTAT_ICMP6)"); |
