aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ocfs2
diff options
context:
space:
mode:
authorFabian Frederick <fabf@skynet.be>2014-06-04 19:06:07 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2014-06-04 19:53:54 -0400
commit69201bb1132718f45078ba6454093f5e220c0350 (patch)
treec41771da7b52891a94e5a78c00ead0e9404b1554 /fs/ocfs2
parent1a5c4e2a0e339a01fdfbd519ba664d8efdc8d702 (diff)
fs/ocfs2/super.c: use OCFS2_MAX_VOL_LABEL_LEN and strlcpy
Replace strncpy(size 63) by defined value. Signed-off-by: Fabian Frederick <fabf@skynet.be> Cc: Joel Becker <jlbec@evilplan.org> Cc: Mark Fasheh <mfasheh@suse.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs/ocfs2')
-rw-r--r--fs/ocfs2/super.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/ocfs2/super.c b/fs/ocfs2/super.c
index 9027729e3992..c7a89cea5c5d 100644
--- a/fs/ocfs2/super.c
+++ b/fs/ocfs2/super.c
@@ -2292,8 +2292,8 @@ static int ocfs2_initialize_super(struct super_block *sb,
2292 goto bail; 2292 goto bail;
2293 } 2293 }
2294 2294
2295 strncpy(osb->vol_label, di->id2.i_super.s_label, 63); 2295 strlcpy(osb->vol_label, di->id2.i_super.s_label,
2296 osb->vol_label[63] = '\0'; 2296 OCFS2_MAX_VOL_LABEL_LEN);
2297 osb->root_blkno = le64_to_cpu(di->id2.i_super.s_root_blkno); 2297 osb->root_blkno = le64_to_cpu(di->id2.i_super.s_root_blkno);
2298 osb->system_dir_blkno = le64_to_cpu(di->id2.i_super.s_system_dir_blkno); 2298 osb->system_dir_blkno = le64_to_cpu(di->id2.i_super.s_system_dir_blkno);
2299 osb->first_cluster_group_blkno = 2299 osb->first_cluster_group_blkno =