From 11a179331ef428906a843b59c69c97f621446f9e Mon Sep 17 00:00:00 2001 From: Kotresh HR Date: Thu, 16 Apr 2015 12:11:24 +0530 Subject: geo-rep/cli : Fix geo-rep cli crash Fixes crash dump when "gluster vol geo-rep 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 Reviewed-on: http://review.gluster.org/10291 Tested-by: NetBSD Build System Reviewed-by: Vijay Bellur Tested-by: Vijay Bellur --- cli/src/cli.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'cli') 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; -- cgit