summaryrefslogtreecommitdiffstats
path: root/xlators/nfs
diff options
context:
space:
mode:
authorXie Changlong <xiechanglong@cmss.chinamobile.com>2019-07-05 15:16:23 +0800
committerjiffin tony Thottan <jthottan@redhat.com>2019-07-08 04:54:39 +0000
commit99d210a704d2e85c95fac5edcf435bd059aad368 (patch)
tree1bf9abad8540c1a0bdd0d2fa562c3a6f93c7c502 /xlators/nfs
parente21544483c25908e9ed142480e9753d646d53605 (diff)
gnfs: use strcpy to prevent memory overflow
fixes: bz#1727248 Change-Id: Iea289032a8feecf2945668d3fb44a6a53089fdea Signed-off-by: Xie Changlong <xiechanglong@cmss.chinamobile.com>
Diffstat (limited to 'xlators/nfs')
-rw-r--r--xlators/nfs/server/src/mount3.c2
1 files changed, 1 insertions, 1 deletions
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);