mirror of
https://github.com/apache/nuttx-apps.git
synced 2025-10-20 21:41:18 +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
@@ -230,8 +230,8 @@ ssize_t netlib_get_devices(FAR struct netlib_device_s *devlist,
|
||||
|
||||
devlist[ncopied].ifindex = iface->ifi_index;
|
||||
#endif
|
||||
strncpy(devlist[ncopied].ifname,
|
||||
(FAR char *)RTA_DATA(attr), IFNAMSIZ);
|
||||
strlcpy(devlist[ncopied].ifname,
|
||||
(FAR char *)RTA_DATA(attr), IFNAMSIZ);
|
||||
ncopied++;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user