]> 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... 58816/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:33:51 +0000 (13:33 +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 squid

src/os/bluestore/bluestore_types.h

index 500a78a143f1c6dc47bbde46b37e28d15e7d3497..3fa9e4e86b4877198750728bac6bba7f81f3b2cb 100644 (file)
@@ -1377,7 +1377,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;