summaryrefslogtreecommitdiff
path: root/fs
diff options
context:
space:
mode:
authorStephen Rothwell <sfr@canb.auug.org.au>2013-08-15 10:57:48 +1000
committerStephen Rothwell <sfr@canb.auug.org.au>2013-08-15 10:57:48 +1000
commit2d240f02cf59d0314f25c8343b2139843a0397c8 (patch)
tree538454c0f0010bff4b53392cf1762c7e420bcde7 /fs
parentf0860aa1145ed1887c6672340ba00515becbe2b7 (diff)
parentb3f8ab4b7953b4719aaa00c22c1de5d9161f57f5 (diff)
Merge remote-tracking branch 'v9fs/for-next'
Diffstat (limited to 'fs')
-rw-r--r--fs/9p/vfs_inode.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/9p/vfs_inode.c b/fs/9p/vfs_inode.c
index 25b018efb8ab..94de6d1482e2 100644
--- a/fs/9p/vfs_inode.c
+++ b/fs/9p/vfs_inode.c
@@ -146,7 +146,7 @@ static umode_t p9mode2unixmode(struct v9fs_session_info *v9ses,
char type = 0, ext[32];
int major = -1, minor = -1;
- strncpy(ext, stat->extension, sizeof(ext));
+ strlcpy(ext, stat->extension, sizeof(ext));
sscanf(ext, "%c %u %u", &type, &major, &minor);
switch (type) {
case 'c':
@@ -1186,7 +1186,7 @@ v9fs_stat2inode(struct p9_wstat *stat, struct inode *inode,
* this even with .u extension. So check
* for non NULL stat->extension
*/
- strncpy(ext, stat->extension, sizeof(ext));
+ strlcpy(ext, stat->extension, sizeof(ext));
/* HARDLINKCOUNT %u */
sscanf(ext, "%13s %u", tag_name, &i_nlink);
if (!strncmp(tag_name, "HARDLINKCOUNT", 13))