aboutsummaryrefslogtreecommitdiffstats
path: root/fs/9p/vfs_inode.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/9p/vfs_inode.c')
-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,
146 char type = 0, ext[32]; 146 char type = 0, ext[32];
147 int major = -1, minor = -1; 147 int major = -1, minor = -1;
148 148
149 strncpy(ext, stat->extension, sizeof(ext)); 149 strlcpy(ext, stat->extension, sizeof(ext));
150 sscanf(ext, "%c %u %u", &type, &major, &minor); 150 sscanf(ext, "%c %u %u", &type, &major, &minor);
151 switch (type) { 151 switch (type) {
152 case 'c': 152 case 'c':
@@ -1186,7 +1186,7 @@ v9fs_stat2inode(struct p9_wstat *stat, struct inode *inode,
1186 * this even with .u extension. So check 1186 * this even with .u extension. So check
1187 * for non NULL stat->extension 1187 * for non NULL stat->extension
1188 */ 1188 */
1189 strncpy(ext, stat->extension, sizeof(ext)); 1189 strlcpy(ext, stat->extension, sizeof(ext));
1190 /* HARDLINKCOUNT %u */ 1190 /* HARDLINKCOUNT %u */
1191 sscanf(ext, "%13s %u", tag_name, &i_nlink); 1191 sscanf(ext, "%13s %u", tag_name, &i_nlink);
1192 if (!strncmp(tag_name, "HARDLINKCOUNT", 13)) 1192 if (!strncmp(tag_name, "HARDLINKCOUNT", 13))