[Ocfs2-devel] [PATCH 1/6] Add clustername to cluster connection
Mark Fasheh
mfasheh at suse.de
Sun Nov 3 14:09:37 PST 2013
On Fri, Oct 18, 2013 at 09:45:12AM -0500, Goldwyn Rodrigues wrote:
> diff --git a/fs/ocfs2/super.c b/fs/ocfs2/super.c
> index 121da2d..c30ad6b 100644
> --- a/fs/ocfs2/super.c
> +++ b/fs/ocfs2/super.c
> @@ -2225,9 +2225,9 @@ static int ocfs2_initialize_super(struct super_block *sb,
> if (ocfs2_clusterinfo_valid(osb)) {
> osb->osb_stackflags =
> OCFS2_RAW_SB(di)->s_cluster_info.ci_stackflags;
> - memcpy(osb->osb_cluster_stack,
> + strlcpy(osb->osb_cluster_stack,
> OCFS2_RAW_SB(di)->s_cluster_info.ci_stack,
> - OCFS2_STACK_LABEL_LEN);
> + OCFS2_STACK_LABEL_LEN + 1);
> osb->osb_cluster_stack[OCFS2_STACK_LABEL_LEN] = '\0';
I don't think we want to NULL terminate like this any more, right?
Otherwise the rest of this looks reasonable to me.
--Mark
--
Mark Fasheh
More information about the Ocfs2-devel
mailing list