summaryrefslogtreecommitdiff
path: root/Kernel/VM/RangeAllocator.h
diff options
context:
space:
mode:
Diffstat (limited to 'Kernel/VM/RangeAllocator.h')
-rw-r--r--Kernel/VM/RangeAllocator.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/Kernel/VM/RangeAllocator.h b/Kernel/VM/RangeAllocator.h
index bc6ce844a6..999282deff 100644
--- a/Kernel/VM/RangeAllocator.h
+++ b/Kernel/VM/RangeAllocator.h
@@ -57,6 +57,8 @@ public:
bool contains(VirtualAddress base, size_t size) const
{
+ if (base.offset(size) < base)
+ return false;
return base >= m_base && base.offset(size) <= end();
}