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_getpanid(FAR const char *ifname, FAR uint8_t *panid)
{
/* Perform the IOCTL */
strncpy(arg.ifr_name, ifname, IFNAMSIZ);
strlcpy(arg.ifr_name, ifname, IFNAMSIZ);
arg.u.getreq.attr = IEEE802154_ATTR_MAC_PANID;
ret = ioctl(sockfd, MAC802154IOC_MLME_GET_REQUEST,