diff options
Diffstat (limited to 'cli/src/cli-cmd-parser.c')
-rw-r--r-- | cli/src/cli-cmd-parser.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/cli/src/cli-cmd-parser.c b/cli/src/cli-cmd-parser.c index 8ea6581aff8..92626df76b5 100644 --- a/cli/src/cli-cmd-parser.c +++ b/cli/src/cli-cmd-parser.c @@ -320,6 +320,11 @@ cli_cmd_volume_create_parse (const char **words, int wordcount, dict_t **options /* reset the count value now */ count = 1; + if (index >= wordcount) { + ret = -1; + goto out; + } + brick_index = index; ret = cli_cmd_bricks_parse (words, wordcount, brick_index, &bricks, |