Fix rptun/rptun.c:572:7: warning: 'strncpy' specified bound 32 equals destination size

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
This commit is contained in:
Xiang Xiao 2022-03-21 23:59:59 +08:00 committed by Petro Karashchenko
parent cd516bd09d
commit 2277c18673
1 changed files with 1 additions and 1 deletions

View File

@ -434,7 +434,7 @@ static void rptun_ns_bind(FAR struct rpmsg_device *rdev,
FAR struct rptun_cb_s *cb;
bind->dest = dest;
strncpy(bind->name, name, RPMSG_NAME_SIZE);
strlcpy(bind->name, name, RPMSG_NAME_SIZE);
rptun_lock();