mirror of
https://github.com/apache/nuttx-apps.git
synced 2025-10-19 02:17:37 +08:00
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
5451214d0b
commit
0426c8c09f
@@ -70,7 +70,7 @@ int netlib_get_dripv4addr(FAR const char *ifname, FAR struct in_addr *addr)
|
||||
if (sockfd >= 0)
|
||||
{
|
||||
struct ifreq req;
|
||||
strncpy(req.ifr_name, ifname, IFNAMSIZ);
|
||||
strlcpy(req.ifr_name, ifname, IFNAMSIZ);
|
||||
ret = ioctl(sockfd, SIOCGIFDSTADDR, (unsigned long)&req);
|
||||
if (!ret)
|
||||
{
|
||||
|
Reference in New Issue
Block a user