diff options
author | ume <ume@FreeBSD.org> | 2003-08-17 16:06:52 +0000 |
---|---|---|
committer | ume <ume@FreeBSD.org> | 2003-08-17 16:06:52 +0000 |
commit | 27091af60aa331bee912fe61e89b6cc3ac70435d (patch) | |
tree | 5d024d5e7240cb9f2aede3879bbebc52b073ad2d /usr.sbin | |
parent | d210f3869d72aa27434f4fda3ede320fd220fd81 (diff) | |
download | FreeBSD-src-27091af60aa331bee912fe61e89b6cc3ac70435d.zip FreeBSD-src-27091af60aa331bee912fe61e89b6cc3ac70435d.tar.gz |
use strncpy
Obtained from: KAME
MFC after: 1 week
Diffstat (limited to 'usr.sbin')
-rw-r--r-- | usr.sbin/route6d/route6d.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/usr.sbin/route6d/route6d.c b/usr.sbin/route6d/route6d.c index a08d7cb..d69301c 100644 --- a/usr.sbin/route6d/route6d.c +++ b/usr.sbin/route6d/route6d.c @@ -1457,7 +1457,7 @@ ifconfig1(name, sa, ifcp, s) sin6 = (const struct sockaddr_in6 *)sa; ifr.ifr_addr = *sin6; - strcpy(ifr.ifr_name, name); + strncpy(ifr.ifr_name, name, sizeof(ifr.ifr_name)); if (ioctl(s, SIOCGIFNETMASK_IN6, (char *)&ifr) < 0) { fatal("ioctl: SIOCGIFNETMASK_IN6"); /*NOTREACHED*/ |