Fix address space allocator slow path to avoid OOB

This commit is contained in:
Billy Laws 2023-01-29 22:15:20 +00:00
parent 4a4f6df792
commit 12c88babd0

View File

@ -470,7 +470,7 @@ namespace skyline {
if (this->blocks.size() <= 2) if (this->blocks.size() <= 2)
throw exception("Unexpected allocator state!"); throw exception("Unexpected allocator state!");
auto searchPredecessor{this->blocks.begin()}; auto searchPredecessor{std::next(this->blocks.begin())};
auto searchSuccessor{std::next(searchPredecessor)}; auto searchSuccessor{std::next(searchPredecessor)};
while (searchSuccessor != this->blocks.end() && while (searchSuccessor != this->blocks.end() &&