diff --git a/drivers/rptun/rptun.c b/drivers/rptun/rptun.c index ad35d04354..6f9094e9ab 100644 --- a/drivers/rptun/rptun.c +++ b/drivers/rptun/rptun.c @@ -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();