mirror of
https://github.com/apache/nuttx.git
synced 2026-05-28 11:56:10 +08:00
net:fix coverity warning
Signed-off-by: hejianliang3 <hejianliang3@xiaomi.com>
This commit is contained in:
committed by
Petro Karashchenko
parent
451c53daa4
commit
e9648d8a73
@@ -217,7 +217,7 @@ netlink_get_device(FAR struct net_driver_s *dev,
|
||||
resp->attr.rta_len = RTA_LENGTH(strnlen(dev->d_ifname, IFNAMSIZ));
|
||||
resp->attr.rta_type = IFLA_IFNAME;
|
||||
|
||||
strncpy((FAR char *)resp->data, dev->d_ifname, IFNAMSIZ);
|
||||
strlcpy((FAR char *)resp->data, dev->d_ifname, IFNAMSIZ);
|
||||
|
||||
/* Finally, return the response */
|
||||
|
||||
|
||||
Reference in New Issue
Block a user