diff options
author | Atin Mukherjee <amukherj@redhat.com> | 2014-12-26 10:12:11 +0530 |
---|---|---|
committer | Krishnan Parthasarathi <kparthas@redhat.com> | 2014-12-28 21:25:28 -0800 |
commit | 94dacaa4e91d11760666e9c4e4a6bdf39ae03c6b (patch) | |
tree | f357a82b5e5f718f86516cba7b2a962d4e2be1b2 /xlators/mgmt | |
parent | 86433c25b61073f244cde0bf80a7857b57ab1265 (diff) |
glusterd: coverity fix for overrun in glusterd_stop_uds_listener
CID: 1260432
Change-Id: I6845bc4c231b53428419a5a2ad0c78ea9da31058
BUG: 1093692
Signed-off-by: Atin Mukherjee <amukherj@redhat.com>
Reviewed-on: http://review.gluster.org/9338
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Krishnan Parthasarathi <kparthas@redhat.com>
Tested-by: Krishnan Parthasarathi <kparthas@redhat.com>
Diffstat (limited to 'xlators/mgmt')
-rw-r--r-- | xlators/mgmt/glusterd/src/glusterd.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd.c b/xlators/mgmt/glusterd/src/glusterd.c index d915e62143c..4f99a736dcf 100644 --- a/xlators/mgmt/glusterd/src/glusterd.c +++ b/xlators/mgmt/glusterd/src/glusterd.c @@ -1225,7 +1225,7 @@ glusterd_init_uds_listener (xlator_t *this) dict_t *options = NULL; rpcsvc_t *rpc = NULL; data_t *sock_data = NULL; - char sockfile[PATH_MAX+1] = {0,}; + char sockfile[UNIX_PATH_MAX+1] = {0,}; int i = 0; @@ -1233,9 +1233,9 @@ glusterd_init_uds_listener (xlator_t *this) sock_data = dict_get (this->options, "glusterd-sockfile"); if (!sock_data) { - strncpy (sockfile, DEFAULT_GLUSTERD_SOCKFILE, PATH_MAX); + strncpy (sockfile, DEFAULT_GLUSTERD_SOCKFILE, UNIX_PATH_MAX); } else { - strncpy (sockfile, sock_data->data, PATH_MAX); + strncpy (sockfile, sock_data->data, UNIX_PATH_MAX); } options = dict_new (); @@ -1320,9 +1320,9 @@ glusterd_stop_uds_listener (xlator_t *this) sock_data = dict_get (this->options, "glusterd-sockfile"); if (!sock_data) { - strncpy (sockfile, DEFAULT_GLUSTERD_SOCKFILE, PATH_MAX); + strncpy (sockfile, DEFAULT_GLUSTERD_SOCKFILE, UNIX_PATH_MAX); } else { - strncpy (sockfile, sock_data->data, PATH_MAX); + strncpy (sockfile, sock_data->data, UNIX_PATH_MAX); } unlink (sockfile); |