summaryrefslogtreecommitdiffstats
path: root/cli
diff options
context:
space:
mode:
authorKotresh HR <khiremat@redhat.com>2015-04-16 12:11:24 +0530
committerVijay Bellur <vbellur@redhat.com>2015-04-22 05:53:32 -0700
commit11a179331ef428906a843b59c69c97f621446f9e (patch)
tree374d3d977414384b0efb151b096d6aa4d450dbba /cli
parent8b987be340cec4c0f794ef67bdbec6301889500a (diff)
geo-rep/cli : Fix geo-rep cli crash
Fixes crash dump when "gluster vol geo-rep <master-vol> status" is run because of incorrect argc and index comparison. Change-Id: Id14d63d020ad9c5951b54ef50e7c140e58d9d7a6 BUG: 1213048 Reviewed-on: http://review.gluster.org/10264 Signed-off-by: Kotresh HR <khiremat@redhat.com> Reviewed-on: http://review.gluster.org/10291 Tested-by: NetBSD Build System Reviewed-by: Vijay Bellur <vbellur@redhat.com> Tested-by: Vijay Bellur <vbellur@redhat.com>
Diffstat (limited to 'cli')
-rw-r--r--cli/src/cli.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/cli/src/cli.c b/cli/src/cli.c
index 511b45b54ef..525ec4bab72 100644
--- a/cli/src/cli.c
+++ b/cli/src/cli.c
@@ -410,7 +410,7 @@ parse_cmdline (int argc, char *argv[], struct cli_state *state)
state->ctx->secure_mgmt = 1;
}
- if (state->argc >= GEO_REP_CMD_CONFIG_INDEX &&
+ if (state->argc > GEO_REP_CMD_CONFIG_INDEX &&
strtail (state->argv[GEO_REP_CMD_INDEX], "geo") &&
strtail (state->argv[GEO_REP_CMD_CONFIG_INDEX], "co"))
geo_rep_config = _gf_true;