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

@@ -72,7 +72,7 @@ int netlib_setnodeaddr(FAR const char *ifname,
{
/* Copy the network interface name */
strncpy(req.pifr_name, ifname, IFNAMSIZ);
strlcpy(req.pifr_name, ifname, IFNAMSIZ);
/* Copy the node address into the request */