From 99d210a704d2e85c95fac5edcf435bd059aad368 Mon Sep 17 00:00:00 2001 From: Xie Changlong Date: Fri, 5 Jul 2019 15:16:23 +0800 Subject: gnfs: use strcpy to prevent memory overflow fixes: bz#1727248 Change-Id: Iea289032a8feecf2945668d3fb44a6a53089fdea Signed-off-by: Xie Changlong --- xlators/nfs/server/src/mount3.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'xlators/nfs/server') diff --git a/xlators/nfs/server/src/mount3.c b/xlators/nfs/server/src/mount3.c index 734453ca6a2..177046ecf8c 100644 --- a/xlators/nfs/server/src/mount3.c +++ b/xlators/nfs/server/src/mount3.c @@ -2337,7 +2337,7 @@ __build_mountlist(struct mount3_state *ms, int *count) goto free_list; } - strcat(mlist->ml_hostname, me->hostname); + strcpy(mlist->ml_hostname, me->hostname); gf_msg_debug(GF_MNT, 0, "mount entry: dir: %s, host: %s", mlist->ml_directory, mlist->ml_hostname); -- cgit