summaryrefslogtreecommitdiffstats
path: root/xlators/mgmt/glusterd
diff options
context:
space:
mode:
authorVijay Bellur <vbellur@redhat.com>2018-08-12 17:37:10 -0700
committerAtin Mukherjee <amukherj@redhat.com>2018-08-14 15:05:51 +0000
commit2189dedb565c6e36740b0168e57337636e25ef36 (patch)
tree12dec0f885e0504b780738b45d679edf67118f5e /xlators/mgmt/glusterd
parentc41592c79c612237cd10acbfa4a59b85dcce402b (diff)
mgmt/glusterd: Fix buffer length to prevent a memory overrun
Fixes CID 1394647, 1394658 Change-Id: I30cf6e793919a08e0a3fe10622351b8316d7767c updates: bz#789278 Signed-off-by: Vijay Bellur <vbellur@redhat.com>
Diffstat (limited to 'xlators/mgmt/glusterd')
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-statedump.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-statedump.c b/xlators/mgmt/glusterd/src/glusterd-statedump.c
index 02b6ddc9662..a3f12d62ed2 100644
--- a/xlators/mgmt/glusterd/src/glusterd-statedump.c
+++ b/xlators/mgmt/glusterd/src/glusterd-statedump.c
@@ -21,7 +21,7 @@ glusterd_dump_peer (glusterd_peerinfo_t *peerinfo, char *input_key, int index,
gf_boolean_t xpeers)
{
char subkey[144] = {0,};
- char key[128] = {0,};
+ char key[GF_DUMP_MAX_BUF_LEN] = {0,};
strncpy (key, input_key, sizeof(key) - 1);
@@ -65,7 +65,7 @@ glusterd_dump_peer_rpcstat (glusterd_peerinfo_t *peerinfo, char *input_key,
rpc_clnt_t *rpc = NULL;
char rpcsvc_peername[RPCSVC_PEER_STRLEN] = {0,};
char subkey[144] = {0,};
- char key[128] = {0,};
+ char key[GF_DUMP_MAX_BUF_LEN] = {0,};
strncpy (key, input_key, sizeof(key) - 1);