Skip to content

Commit 17315e1

Browse files
authored
Merge pull request ceph#56937 from Svelar/asan_bluestore_type
bluestore/bluestore_types: avoid heap-buffer-overflow in another way to keep code uniformity Reviewed-by: Igor Fedotov <[email protected]>
2 parents 28955bd + 8564caf commit 17315e1

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/os/bluestore/bluestore_types.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1379,12 +1379,12 @@ struct sb_info_space_efficient_map_t {
13791379
if (aux_items.size() != 0) {
13801380
auto it = std::lower_bound(
13811381
aux_items.begin(),
1382-
aux_items.end(),
1382+
aux_items.end() - 1,
13831383
id,
13841384
[](const sb_info_t& a, const uint64_t& b) {
13851385
return a < b;
13861386
});
1387-
if (it != aux_items.end() && it->get_sbid() == id) {
1387+
if (it->get_sbid() == id) {
13881388
return it;
13891389
}
13901390
}

0 commit comments

Comments
 (0)