Skip to content

Commit

Permalink
fs: Replace strncat with strlcat
Browse files Browse the repository at this point in the history
Signed-off-by: Xiang Xiao <[email protected]>
  • Loading branch information
xiaoxiang781216 authored and jerpelea committed May 8, 2023
1 parent 325f395 commit 1955992
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion fs/hostfs/hostfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -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));
}
}

Expand Down
2 changes: 1 addition & 1 deletion fs/rpmsgfs/rpmsgfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 1955992

Please sign in to comment.