diff options
author | Muhammad Zahalqa <m@tryfinally.com> | 2020-08-02 22:10:35 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-08-02 21:10:35 +0200 |
commit | 615ba0f368d5012c7507a10086a54d1fcdb1fbc0 (patch) | |
tree | c0ebb8862236bf0dc4f07261bb3bd4518567f828 /Kernel | |
parent | 2242f69cd625310ddf7ee4d3bcad5e7070819516 (diff) | |
download | serenity-615ba0f368d5012c7507a10086a54d1fcdb1fbc0.zip |
AK: Fix overflow and mixed-signedness issues in binary_search() (#2961)
Diffstat (limited to 'Kernel')
-rw-r--r-- | Kernel/VM/RangeAllocator.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Kernel/VM/RangeAllocator.cpp b/Kernel/VM/RangeAllocator.cpp index 0ea151d07c..3f79f46db8 100644 --- a/Kernel/VM/RangeAllocator.cpp +++ b/Kernel/VM/RangeAllocator.cpp @@ -172,7 +172,7 @@ void RangeAllocator::deallocate(Range range) ASSERT(!m_available_ranges.is_empty()); - int nearby_index = 0; + size_t nearby_index = 0; auto* existing_range = binary_search( m_available_ranges.span(), range, [](auto& a, auto& b) { return a.base().get() - b.end().get(); |