summaryrefslogtreecommitdiffstats
path: root/cli
diff options
context:
space:
mode:
Diffstat (limited to 'cli')
-rw-r--r--cli/src/cli-cmd-parser.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/cli/src/cli-cmd-parser.c b/cli/src/cli-cmd-parser.c
index ae754b97..8725b79f 100644
--- a/cli/src/cli-cmd-parser.c
+++ b/cli/src/cli-cmd-parser.c
@@ -832,6 +832,11 @@ cli_cmd_volume_set_parse (const char **words, int wordcount, dict_t **options)
if (ret == -1)
goto out;
+ if (strlen (value) == 0) {
+ ret = -1;
+ goto out;
+ }
+
ret = cli_add_key_group (dict, key, value);
if (ret == 0)
*options = dict;
@@ -854,6 +859,11 @@ cli_cmd_volume_set_parse (const char **words, int wordcount, dict_t **options)
if (ret == -1)
goto out;
+ if (strlen (value) == 0) {
+ ret = -1;
+ goto out;
+ }
+
if (cli_is_key_spl (key)) {
ret = -1;
goto out;