mirror of
https://github.com/apache/nuttx-apps.git
synced 2025-10-18 17:32:09 +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
@@ -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,
|
||||
|
Reference in New Issue
Block a user