mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 02:07:35 +00:00
Kernel: Range::contains() should reject ranges with 2^32 wrap-around
This commit is contained in:
parent
31d1c82621
commit
31a141bd10
1 changed files with 2 additions and 0 deletions
|
@ -57,6 +57,8 @@ public:
|
||||||
|
|
||||||
bool contains(VirtualAddress base, size_t size) const
|
bool contains(VirtualAddress base, size_t size) const
|
||||||
{
|
{
|
||||||
|
if (base.offset(size) < base)
|
||||||
|
return false;
|
||||||
return base >= m_base && base.offset(size) <= end();
|
return base >= m_base && base.offset(size) <= end();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue