diff options
author | Fabian Frederick <fabf@skynet.be> | 2014-06-06 14:36:15 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2014-06-06 16:08:09 -0700 |
commit | 39d7a29f867bd5a4a551fad6bb3812ceddb0bce1 (patch) | |
tree | 985cb0eeb6f1a38fde6f5abcf0ee6e7921fd27af | |
parent | 8b18daa1bc7ed8a7a06df77de9c4a37e842e83b2 (diff) | |
download | linux-39d7a29f867bd5a4a551fad6bb3812ceddb0bce1.tar.gz linux-39d7a29f867bd5a4a551fad6bb3812ceddb0bce1.tar.bz2 linux-39d7a29f867bd5a4a551fad6bb3812ceddb0bce1.zip |
fs/befs/linuxvfs.c: replace strncpy by strlcpy
strncpy + end of string assignment replaced by strlcpy
Signed-off-by: Fabian Frederick <fabf@skynet.be>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
-rw-r--r-- | fs/befs/linuxvfs.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/fs/befs/linuxvfs.c b/fs/befs/linuxvfs.c index d626756ff721..1e27cd33f7f2 100644 --- a/fs/befs/linuxvfs.c +++ b/fs/befs/linuxvfs.c @@ -396,9 +396,8 @@ static struct inode *befs_iget(struct super_block *sb, unsigned long ino) if (S_ISLNK(inode->i_mode) && !(befs_ino->i_flags & BEFS_LONG_SYMLINK)){ inode->i_size = 0; inode->i_blocks = befs_sb->block_size / VFS_BLOCK_SIZE; - strncpy(befs_ino->i_data.symlink, raw_inode->data.symlink, - BEFS_SYMLINK_LEN - 1); - befs_ino->i_data.symlink[BEFS_SYMLINK_LEN - 1] = '\0'; + strlcpy(befs_ino->i_data.symlink, raw_inode->data.symlink, + BEFS_SYMLINK_LEN); } else { int num_blks; |