]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
bluestore/bluestore_types: avoid heap-buffer-overflow in another way to keep code... 58817/head
authorRongqi Sun <sunrongqi@huawei.com>
Wed, 17 Apr 2024 03:03:43 +0000 (03:03 +0000)
committerRongqi Sun <sunrongqi@huawei.com>
Thu, 25 Jul 2024 05:43:59 +0000 (13:43 +0800)
Signed-off-by: Rongqi Sun <sunrongqi@huawei.com>
(cherry picked from commit 8564caf393a8fe6ef1bb1741a399ab264397648c)

 Conflicts:
src/os/bluestore/bluestore_types.h
- No 'aux_items.end' check in reef

src/os/bluestore/bluestore_types.h

index 4c96e8903260f005436029913cdd86228f928318..e9b0d47eff35ca239ffa357504e90c6c38b29d09 100644 (file)
@@ -1310,7 +1310,7 @@ struct sb_info_space_efficient_map_t {
       if (aux_items.size() != 0) {
        auto it = std::lower_bound(
          aux_items.begin(),
-         aux_items.end(),
+         aux_items.end() - 1,
          id,
          [](const sb_info_t& a, const uint64_t& b) {
            return a < b;