diff options
author | Lalatendu Mohanty <lmohanty@redhat.com> | 2014-01-08 14:25:08 +0530 |
---|---|---|
committer | Vijay Bellur <vbellur@redhat.com> | 2014-01-09 22:43:24 -0800 |
commit | 21ffbf9b92b2478c17f816a8d0418a7cb080998a (patch) | |
tree | cb6405a4661f4e67158a1afe0eca0119a3f1bdce | |
parent | 2b05c1588ac60af26e1b16f9f27ef8d5e4e50a5f (diff) |
geo-rep: Fixing an incorrect memcpy operation.
Currently we are copying a higher size variable to lower size
variable i.e. copying a NAME_MAX to PATH_MAX sized variable
in "memcpy (sts_val->worker_status, monitor_status, strlen(monitor_status));"
Change-Id: I81dca8e81a4aea5545d5982aed20e05a5e08641c
Signed-off-by: Lalatendu Mohanty <lmohanty@redhat.com>
Reviewed-on: http://review.gluster.org/6667
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
-rw-r--r-- | xlators/mgmt/glusterd/src/glusterd-geo-rep.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-geo-rep.c b/xlators/mgmt/glusterd/src/glusterd-geo-rep.c index 5d724cc2a32..c5c76e11a21 100644 --- a/xlators/mgmt/glusterd/src/glusterd-geo-rep.c +++ b/xlators/mgmt/glusterd/src/glusterd-geo-rep.c @@ -2743,7 +2743,7 @@ glusterd_read_status_file (glusterd_volinfo_t *volinfo, char *slave, char *master = NULL; char tmp[1024] = ""; char sts_val_name[1024] = ""; - char monitor_status[PATH_MAX] = ""; + char monitor_status[NAME_MAX] = ""; char *statefile = NULL; char *socketfile = NULL; dict_t *confd = NULL; |