diff options
author | Muthu-vigneshwaran <mvignesh@redhat.com> | 2016-12-01 15:59:26 +0530 |
---|---|---|
committer | Atin Mukherjee <amukherj@redhat.com> | 2016-12-06 04:26:09 -0800 |
commit | b214b643d60cfb30c6578a570963ffc8f79073d8 (patch) | |
tree | 7d9b6f69d6cdcb95b4ed4f10859970aba0252cf1 /xlators/mgmt/glusterd/src/glusterd-volume-ops.c | |
parent | ca13525a5de8db745878c4cdf89a45b76a9e62c6 (diff) |
glusterd : coverity fix for string overflow
CID : 1357872, 1357873, 1351695
BUG: 789278
Change-Id: I2ee01a6054326f35de621ee7a1f2afd09c5738fe
Signed-off-by: Muthu-vigneshwaran <mvignesh@redhat.com>
Reviewed-on: http://review.gluster.org/15989
Tested-by: Muthu Vigneshwaran
Smoke: Gluster Build System <jenkins@build.gluster.org>
NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
Reviewed-by: Manikandan Selvaganesh <manikandancs333@gmail.com>
CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
Reviewed-by: Atin Mukherjee <amukherj@redhat.com>
Diffstat (limited to 'xlators/mgmt/glusterd/src/glusterd-volume-ops.c')
-rw-r--r-- | xlators/mgmt/glusterd/src/glusterd-volume-ops.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-volume-ops.c b/xlators/mgmt/glusterd/src/glusterd-volume-ops.c index 90a165d498e..43bca49b808 100644 --- a/xlators/mgmt/glusterd/src/glusterd-volume-ops.c +++ b/xlators/mgmt/glusterd/src/glusterd-volume-ops.c @@ -2196,7 +2196,7 @@ glusterd_op_create_volume (dict_t *dict, char **op_errstr) goto out; } - strncpy (volinfo->volname, volname, strlen (volname)); + strncpy (volinfo->volname, volname, sizeof(volinfo->volname) - 1); GF_ASSERT (volinfo->volname); ret = dict_get_int32 (dict, "type", &volinfo->type); |