kern: add new overflow checks on KMemoryRegions

This commit is contained in:
Michael Scire
2020-12-01 17:14:23 -08:00
parent 866310937a
commit a56bdab820
8 changed files with 32 additions and 1 deletions

View File

@@ -93,6 +93,7 @@ namespace ams::kern {
}
constexpr ALWAYS_INLINE bool Contains(uintptr_t address) const {
MESOSPHERE_INIT_ABORT_UNLESS(this->GetEndAddress() != 0);
return this->GetAddress() <= address && address <= this->GetLastAddress();
}