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:
parent
cd516bd09d
commit
2277c18673
|
@ -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();
|
||||
|
||||
|
|
Loading…
Reference in New Issue