diff options
-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) | |||
396 | if (S_ISLNK(inode->i_mode) && !(befs_ino->i_flags & BEFS_LONG_SYMLINK)){ | 396 | if (S_ISLNK(inode->i_mode) && !(befs_ino->i_flags & BEFS_LONG_SYMLINK)){ |
397 | inode->i_size = 0; | 397 | inode->i_size = 0; |
398 | inode->i_blocks = befs_sb->block_size / VFS_BLOCK_SIZE; | 398 | inode->i_blocks = befs_sb->block_size / VFS_BLOCK_SIZE; |
399 | strncpy(befs_ino->i_data.symlink, raw_inode->data.symlink, | 399 | strlcpy(befs_ino->i_data.symlink, raw_inode->data.symlink, |
400 | BEFS_SYMLINK_LEN - 1); | 400 | BEFS_SYMLINK_LEN); |
401 | befs_ino->i_data.symlink[BEFS_SYMLINK_LEN - 1] = '\0'; | ||
402 | } else { | 401 | } else { |
403 | int num_blks; | 402 | int num_blks; |
404 | 403 | ||