mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-13 10:02:38 +00:00
use strncpy
Obtained from: KAME MFC after: 1 week
This commit is contained in:
parent
4c4ac8c03d
commit
be71e4ad8a
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=119032
@ -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*/
|
||||
|
Loading…
Reference in New Issue
Block a user