From 6fed48b3a45369bebf262fc047fe68e2110d63cf Mon Sep 17 00:00:00 2001 From: Kelebek1 Date: Sun, 7 May 2023 15:11:16 +0100 Subject: [PATCH] Fix address space allocator slow path to avoid OOB --- src/common/address_space.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/common/address_space.inc b/src/common/address_space.inc index c97dc86516..1ee82df53b 100644 --- a/src/common/address_space.inc +++ b/src/common/address_space.inc @@ -336,7 +336,7 @@ ALLOC_MEMBER(VaType)::Allocate(VaType size) { ASSERT_MSG(false, "Unexpected allocator state!"); } - auto search_predecessor{this->blocks.begin()}; + auto search_predecessor{std::next(this->blocks.begin())}; auto search_successor{std::next(search_predecessor)}; while (search_successor != this->blocks.end() &&