This is an automated email from the ASF dual-hosted git repository. jerpelea pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/nuttx.git
commit 1955992ae5cd1894c78398e1206bacd7dc2a1e49 Author: Xiang Xiao <xiaoxi...@xiaomi.com> AuthorDate: Mon Mar 6 01:35:34 2023 +0800 fs: Replace strncat with strlcat Signed-off-by: Xiang Xiao <xiaoxi...@xiaomi.com> --- fs/hostfs/hostfs.c | 2 +- fs/rpmsgfs/rpmsgfs.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/fs/hostfs/hostfs.c b/fs/hostfs/hostfs.c index f250f3d989..f7c4a70886 100644 --- a/fs/hostfs/hostfs.c +++ b/fs/hostfs/hostfs.c @@ -228,7 +228,7 @@ static void hostfs_mkpath(FAR struct hostfs_mountpt_s *fs, if (depth >= 0) { - strncat(path, &relpath[first], pathlen - strlen(path) - 1); + strlcat(path, &relpath[first], pathlen - strlen(path)); } } diff --git a/fs/rpmsgfs/rpmsgfs.c b/fs/rpmsgfs/rpmsgfs.c index c8b8d048b2..d46a2c0e84 100644 --- a/fs/rpmsgfs/rpmsgfs.c +++ b/fs/rpmsgfs/rpmsgfs.c @@ -247,7 +247,7 @@ static void rpmsgfs_mkpath(FAR struct rpmsgfs_mountpt_s *fs, if (depth >= 0) { - strncat(path, &relpath[first], pathlen - strlen(path) - 1); + strlcat(path, &relpath[first], pathlen - strlen(path)); } while (fs->timeout > 0)