mirror of
https://github.com/ceph/ceph
synced 2025-01-11 05:29:51 +00:00
mon: avoid OOB m->cmd access in auth proprocess_command
Signed-off-by: Sage Weil <sage@newdream.net>
This commit is contained in:
parent
c91c8a3115
commit
878a7de521
@ -496,10 +496,10 @@ bool AuthMonitor::preprocess_command(MMonCommand *m)
|
||||
r = 0;
|
||||
}
|
||||
}
|
||||
else if (m->cmd[1] == "get") {
|
||||
else if (m->cmd[1] == "get" && m->cmd.size() > 2) {
|
||||
KeyRing keyring;
|
||||
EntityName entity;
|
||||
if(!entity.from_str(m->cmd[2])) {
|
||||
if (!entity.from_str(m->cmd[2])) {
|
||||
ss << "failed to identify entity name from " << m->cmd[2];
|
||||
r = -ENOENT;
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user