summaryrefslogtreecommitdiffstats
path: root/tools/lvm.c
diff options
context:
space:
mode:
authorAlasdair Kergon <agk@redhat.com>2010-07-01 11:04:58 +0000
committerAlasdair Kergon <agk@redhat.com>2010-07-01 11:04:58 +0000
commit89dd7d5275136d7d5d1b2288d944b523e65a903c (patch)
treef44e611b0fb436654811a16dd866c09d760d1b47 /tools/lvm.c
parent22a859230196f3354b49e79f3d6bdd3ce7274088 (diff)
downloadlvm2-89dd7d5275136d7d5d1b2288d944b523e65a903c.tar.gz
lvm2-89dd7d5275136d7d5d1b2288d944b523e65a903c.tar.xz
lvm2-89dd7d5275136d7d5d1b2288d944b523e65a903c.zip
Fix lvm shell crash when input is entirely whitespace. (Xinwei Hu)
Diffstat (limited to 'tools/lvm.c')
-rw-r--r--tools/lvm.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/tools/lvm.c b/tools/lvm.c
index d1c2f9b5..0ca5cee7 100644
--- a/tools/lvm.c
+++ b/tools/lvm.c
@@ -217,6 +217,9 @@ int lvm_shell(struct cmd_context *cmd, struct cmdline_context *cmdline)
continue;
}
+ if (!argc)
+ continue;
+
if (!strcmp(argv[0], "lvm")) {
argv++;
argc--;