Skip to content

Commit

Permalink
os/bluestore: narrow boundary check for fiemap
Browse files Browse the repository at this point in the history
By including off-by-one.

Signed-off-by: xie xingguo <[email protected]>
  • Loading branch information
xiexingguo committed Nov 5, 2016
1 parent d95d522 commit 4ebc5ab
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/os/bluestore/BlueStore.cc
Original file line number Diff line number Diff line change
Expand Up @@ -5379,7 +5379,7 @@ int BlueStore::fiemap(
<< " size 0x" << o->onode.size << std::dec << dendl;

boost::intrusive::set<Extent>::iterator ep, eend;
if (offset > o->onode.size)
if (offset >= o->onode.size)
goto out;

if (offset + length > o->onode.size) {
Expand Down

0 comments on commit 4ebc5ab

Please sign in to comment.