Skip to content

Commit 1955992

Browse files
xiaoxiang781216jerpelea
authored andcommitted
fs: Replace strncat with strlcat
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
1 parent 325f395 commit 1955992

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

fs/hostfs/hostfs.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,7 @@ static void hostfs_mkpath(FAR struct hostfs_mountpt_s *fs,
228228

229229
if (depth >= 0)
230230
{
231-
strncat(path, &relpath[first], pathlen - strlen(path) - 1);
231+
strlcat(path, &relpath[first], pathlen - strlen(path));
232232
}
233233
}
234234

fs/rpmsgfs/rpmsgfs.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -247,7 +247,7 @@ static void rpmsgfs_mkpath(FAR struct rpmsgfs_mountpt_s *fs,
247247

248248
if (depth >= 0)
249249
{
250-
strncat(path, &relpath[first], pathlen - strlen(path) - 1);
250+
strlcat(path, &relpath[first], pathlen - strlen(path));
251251
}
252252

253253
while (fs->timeout > 0)

0 commit comments

Comments
 (0)