From 12c88babd0a8599425007a1c02a74bd4639e4600 Mon Sep 17 00:00:00 2001 From: Billy Laws Date: Sun, 29 Jan 2023 22:15:20 +0000 Subject: [PATCH] Fix address space allocator slow path to avoid OOB --- app/src/main/cpp/skyline/common/address_space.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/cpp/skyline/common/address_space.inc b/app/src/main/cpp/skyline/common/address_space.inc index db76f13e..01be4a0a 100644 --- a/app/src/main/cpp/skyline/common/address_space.inc +++ b/app/src/main/cpp/skyline/common/address_space.inc @@ -470,7 +470,7 @@ namespace skyline { if (this->blocks.size() <= 2) throw exception("Unexpected allocator state!"); - auto searchPredecessor{this->blocks.begin()}; + auto searchPredecessor{std::next(this->blocks.begin())}; auto searchSuccessor{std::next(searchPredecessor)}; while (searchSuccessor != this->blocks.end() &&