From: Joao Eduardo Luis Date: Thu, 21 Feb 2013 17:44:39 +0000 (+0000) Subject: mon: Monitor: check for an argument to 'quorum' before reading the array X-Git-Tag: v0.59~96^2~2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=cf20ea6e1a51adf725653f4fcde547bd87bf8670;p=ceph.git mon: Monitor: check for an argument to 'quorum' before reading the array Fixes: #4218 Signed-off-by: Joao Eduardo Luis --- diff --git a/src/mon/Monitor.cc b/src/mon/Monitor.cc index d39491defadd..716eeabe63a4 100644 --- a/src/mon/Monitor.cc +++ b/src/mon/Monitor.cc @@ -2616,6 +2616,11 @@ void Monitor::handle_command(MMonCommand *m) rs = "access denied"; goto out; } + if (m->cmd.size() < 2) { + r = -EINVAL; + rs = "'quorum' requires an argument: 'exit' or 'enter'"; + goto out; + } if (m->cmd[1] == "exit") { reset(); start_election();