diff options
author | Sage Weil <sage@inktank.com> | 2013-02-19 15:52:03 -0800 |
---|---|---|
committer | Sage Weil <sage@inktank.com> | 2013-02-19 15:52:03 -0800 |
commit | c86f9239a2fd87dc6021481227864f1316f97c29 (patch) | |
tree | 6062ff120b05360dfcc2042d11cf457671c4cd0f | |
parent | 4eb9bf21cb2909ffd46e7c8b9ae79f6aac6403c6 (diff) | |
parent | 30b8d653751acb4bc4be5ca611f154e19afe910a (diff) | |
download | ceph-c86f9239a2fd87dc6021481227864f1316f97c29.tar.gz |
Merge remote-tracking branch 'gh/wip-4159'
-rw-r--r-- | src/mon/OSDMonitor.cc | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/mon/OSDMonitor.cc b/src/mon/OSDMonitor.cc index 9c094307e4c..0198c29e45b 100644 --- a/src/mon/OSDMonitor.cc +++ b/src/mon/OSDMonitor.cc @@ -3013,6 +3013,11 @@ bool OSDMonitor::prepare_command(MMonCommand *m) unsigned n = strtol(start, &end, 10); if (*end == '\0') { if (m->cmd[4] == "size") { + if (n == 0 || n > 10) { + ss << "pool size must be between 1 and 10"; + err = -EINVAL; + goto out; + } if (pending_inc.new_pools.count(pool) == 0) pending_inc.new_pools[pool] = *p; pending_inc.new_pools[pool].size = n; |