From: Josh Durgin Date: Mon, 24 Sep 2012 21:26:51 +0000 (-0700) Subject: librbd: don't allow order to be more than 64 X-Git-Tag: v0.53~41^2~35 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=52943a6a7063d358bd3a9f3652ccecd23e631f88;p=ceph.git librbd: don't allow order to be more than 64 Otherwise it will overflow a uint64_t when shifting. Signed-off-by: Josh Durgin --- diff --git a/src/librbd/internal.cc b/src/librbd/internal.cc index a376da10f33..2e5fefac95a 100644 --- a/src/librbd/internal.cc +++ b/src/librbd/internal.cc @@ -692,8 +692,8 @@ reprotect_and_return_err: if (!order) return -EINVAL; - if (*order && (*order > 255 || *order < 12)) { - lderr(cct) << "order must be in the range [12, 255]" << dendl; + if (*order && (*order > 64 || *order < 12)) { + lderr(cct) << "order must be in the range [12, 64]" << dendl; return -EDOM; }