Replace all strcat with strlcat
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
This commit is contained in:
parent
6354a742f1
commit
fa8719bb5a
@ -1554,11 +1554,11 @@ static int add_interface(FAR const char *path,
|
||||
{
|
||||
/* Convert @path to a directory name. */
|
||||
|
||||
strcat(buf, "/");
|
||||
strlcat(buf, "/", sizeof(buf));
|
||||
|
||||
/* Append the real interface name. */
|
||||
|
||||
strcat(buf, name);
|
||||
strlcat(buf, name, sizeof(buf));
|
||||
}
|
||||
|
||||
/* Register the interface in the usual way. NuttX will build the
|
||||
|
@ -1080,7 +1080,7 @@ static int hostfs_bind(FAR struct inode *blkdriver, FAR const void *data,
|
||||
|
||||
if (fs->fs_root[len - 1] != '/')
|
||||
{
|
||||
strcat(fs->fs_root, "/");
|
||||
strlcat(fs->fs_root, "/", sizeof(fs->fs_root));
|
||||
}
|
||||
|
||||
*handle = (FAR void *)fs;
|
||||
|
@ -1140,7 +1140,7 @@ static int rpmsgfs_bind(FAR struct inode *blkdriver, FAR const void *data,
|
||||
|
||||
if (fs->fs_root[len - 1] != '/')
|
||||
{
|
||||
strcat(fs->fs_root, "/");
|
||||
strlcat(fs->fs_root, "/", sizeof(fs->fs_root));
|
||||
}
|
||||
|
||||
*handle = (FAR void *)fs;
|
||||
|
Loading…
Reference in New Issue
Block a user