projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8b18daa
)
fs/befs/linuxvfs.c: replace strncpy by strlcpy
author
Fabian Frederick
<
[email protected]
>
Fri, 6 Jun 2014 21:36:15 +0000
(14:36 -0700)
committer
Linus Torvalds
<
[email protected]
>
Fri, 6 Jun 2014 23:08:09 +0000
(16:08 -0700)
strncpy + end of string assignment replaced by strlcpy
Signed-off-by: Fabian Frederick <
[email protected]
>
Signed-off-by: Andrew Morton <
[email protected]
>
Signed-off-by: Linus Torvalds <
[email protected]
>
fs/befs/linuxvfs.c
patch
|
blob
|
history
diff --git
a/fs/befs/linuxvfs.c
b/fs/befs/linuxvfs.c
index d626756ff7219415d027380590371b70384445c9..1e27cd33f7f20a7449f9a80c8adb17c4a4598d60 100644
(file)
--- 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;