netutils/netlib: Fix error: 'strncpy' specified bound 16 equals destination size

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
This commit is contained in:
Xiang Xiao
2022-03-05 01:49:01 +08:00
committed by Petro Karashchenko
parent f31cc67da8
commit 3afd1234e0
7 changed files with 8 additions and 8 deletions

View File

@@ -165,7 +165,7 @@ static int _netlib_ipv6adaptor(FAR const struct in6_addr *destipaddr,
/* Get the network mask */
strncpy(maskreq.lifr_name, lifr->lifr_name, IFNAMSIZ);
strlcpy(maskreq.lifr_name, lifr->lifr_name, IFNAMSIZ);
status = ioctl(sd, SIOCGLIFNETMASK,
(unsigned long)((uintptr_t)&maskreq));