diff options
author | Vijay Bellur <vijay@gluster.com> | 2010-09-09 05:56:02 +0000 |
---|---|---|
committer | Vijay Bellur <vijay@dev.gluster.com> | 2010-09-09 05:23:27 -0700 |
commit | d65c85001a6d57f6b147d565d45a704c890cfe08 (patch) | |
tree | a0d7f8c64d02e94d5d97b22ad930e29826116cc8 | |
parent | 9ed068a03e6f07e7f0bb69b32c08cd251f369ce8 (diff) |
mgmt/glusterd: Use appropriate length while doing strncpy
Signed-off-by: Vijay Bellur <vijay@gluster.com>
Signed-off-by: Vijay Bellur <vijay@dev.gluster.com>
BUG: 1583 (glusterd crash)
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=1583
-rw-r--r-- | xlators/mgmt/glusterd/src/glusterd-op-sm.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-op-sm.c b/xlators/mgmt/glusterd/src/glusterd-op-sm.c index db3305c6437..19bc73e15fa 100644 --- a/xlators/mgmt/glusterd/src/glusterd-op-sm.c +++ b/xlators/mgmt/glusterd/src/glusterd-op-sm.c @@ -1052,7 +1052,7 @@ glusterd_op_create_volume (gd1_mgmt_stage_op_req *req) goto out; } - strncpy (volinfo->volname, volname, 1024); + strncpy (volinfo->volname, volname, GLUSTERD_MAX_VOLUME_NAME); GF_ASSERT (volinfo->volname); ret = dict_get_int32 (dict, "type", &volinfo->type); |