mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2025-01-09 14:43:16 +00:00
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>
This commit is contained in:
parent
1a5c4e2a0e
commit
69201bb113
@ -2292,8 +2292,8 @@ static int ocfs2_initialize_super(struct super_block *sb,
|
|||||||
goto bail;
|
goto bail;
|
||||||
}
|
}
|
||||||
|
|
||||||
strncpy(osb->vol_label, di->id2.i_super.s_label, 63);
|
strlcpy(osb->vol_label, di->id2.i_super.s_label,
|
||||||
osb->vol_label[63] = '\0';
|
OCFS2_MAX_VOL_LABEL_LEN);
|
||||||
osb->root_blkno = le64_to_cpu(di->id2.i_super.s_root_blkno);
|
osb->root_blkno = le64_to_cpu(di->id2.i_super.s_root_blkno);
|
||||||
osb->system_dir_blkno = le64_to_cpu(di->id2.i_super.s_system_dir_blkno);
|
osb->system_dir_blkno = le64_to_cpu(di->id2.i_super.s_system_dir_blkno);
|
||||||
osb->first_cluster_group_blkno =
|
osb->first_cluster_group_blkno =
|
||||||
|
Loading…
x
Reference in New Issue
Block a user