Replace all strncpy with strlcpy

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
This commit is contained in:
Xiang Xiao 2023-03-06 01:26:18 +08:00 committed by Petro Karashchenko
parent 7c37421266
commit 73701cd7cd
35 changed files with 78 additions and 121 deletions

View file

@ -364,8 +364,8 @@ static int nxscope_put_vector(FAR uint8_t *buff, uint8_t type, FAR void *val,
DEBUGASSERT(val);
strncpy((FAR char *)buff, (FAR const char *)val, d);
j += strnlen((FAR char *)buff, d);
strlcpy((FAR char *)buff, (FAR const char *)val, d);
j += strlen((FAR char *)buff);
memset(&buff[j], '\0', d - j);
j = d;