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-02-13 14:46:40 +08:00
committed by Petro Karashchenko
parent 5451214d0b
commit 0426c8c09f
17 changed files with 18 additions and 18 deletions

View File

@@ -77,7 +77,7 @@ int netlib_getessid(FAR const char *ifname, FAR char *essid, size_t idlen)
/* Put the driver name into the request */
memset(&req, 0, sizeof(struct iwreq));
strncpy(req.ifr_name, ifname, IFNAMSIZ);
strlcpy(req.ifr_name, ifname, IFNAMSIZ);
/* Put pointer to receive the ESSID into the request */