mirror of
https://github.com/apache/nuttx-apps.git
synced 2025-10-19 19:44:35 +08:00
netutils/netlib: Fix error: 'strncpy' specified bound 16 equals destination size
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
This commit is contained in:

committed by
Petro Karashchenko

parent
f31cc67da8
commit
3afd1234e0
@@ -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));
|
||||
|
Reference in New Issue
Block a user