diff options
author | Andreas Kling <kling@serenityos.org> | 2021-07-14 00:13:18 +0200 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2021-07-14 01:37:19 +0200 |
commit | 5c24d189237bbd5e8ce9fe8236efd50ca10dadb0 (patch) | |
tree | 796e1885a522e7b470b3b4e4e9258076fcc096b9 /Kernel | |
parent | 6cc12473958d84f2dab8d99371e41c6bafb87b10 (diff) | |
download | serenity-5c24d189237bbd5e8ce9fe8236efd50ca10dadb0.zip |
Kernel: Fix logic error in PhysicalRegion::contains()
This was incorrectly returning true for the address one byte past the
end of the region.
Diffstat (limited to 'Kernel')
-rw-r--r-- | Kernel/VM/PhysicalRegion.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Kernel/VM/PhysicalRegion.h b/Kernel/VM/PhysicalRegion.h index 769ca35f30..c6962768c8 100644 --- a/Kernel/VM/PhysicalRegion.h +++ b/Kernel/VM/PhysicalRegion.h @@ -30,7 +30,7 @@ public: PhysicalAddress lower() const { return m_lower; } PhysicalAddress upper() const { return m_upper; } unsigned size() const { return m_pages; } - bool contains(PhysicalAddress paddr) const { return paddr >= m_lower && paddr <= m_upper; } + bool contains(PhysicalAddress paddr) const { return paddr >= m_lower && paddr < m_upper; } OwnPtr<PhysicalRegion> try_take_pages_from_beginning(unsigned); |