1
0
Fork 0
mirror of https://github.com/Atmosphere-NX/Atmosphere.git synced 2024-11-26 13:52:21 +00:00

kern: if a page table region is zero-size, nothing overlaps it

This commit is contained in:
Michael Scire 2021-04-07 09:59:22 -07:00 committed by SciresM
parent 85f9355184
commit 6e4664ee05

View file

@ -426,8 +426,8 @@ namespace ams::kern {
const size_t region_size = this->GetRegionSize(state); const size_t region_size = this->GetRegionSize(state);
const bool is_in_region = region_start <= addr && addr < end && last <= region_start + region_size - 1; const bool is_in_region = region_start <= addr && addr < end && last <= region_start + region_size - 1;
const bool is_in_heap = !(end <= m_heap_region_start || m_heap_region_end <= addr); const bool is_in_heap = !(end <= m_heap_region_start || m_heap_region_end <= addr || m_heap_region_start == m_heap_region_end);
const bool is_in_alias = !(end <= m_alias_region_start || m_alias_region_end <= addr); const bool is_in_alias = !(end <= m_alias_region_start || m_alias_region_end <= addr || m_alias_region_start == m_alias_region_end);
switch (state) { switch (state) {
case KMemoryState_Free: case KMemoryState_Free:
case KMemoryState_Kernel: case KMemoryState_Kernel: