mirror of
https://github.com/Atmosphere-NX/Atmosphere.git
synced 2024-12-19 17:02:14 +00:00
kern: fix whoops in new page table logic
This commit is contained in:
parent
6113ffa191
commit
1f44a9c4bf
1 changed files with 1 additions and 1 deletions
|
@ -301,7 +301,7 @@ namespace ams::kern {
|
||||||
/* If aslr is enabled, randomize the current region order. Otherwise, sort by type. */
|
/* If aslr is enabled, randomize the current region order. Otherwise, sort by type. */
|
||||||
if (m_enable_aslr) {
|
if (m_enable_aslr) {
|
||||||
for (size_t i = 0; i < cur_alloc_count - 1; ++i) {
|
for (size_t i = 0; i < cur_alloc_count - 1; ++i) {
|
||||||
std::swap(region_layouts[i], region_layouts[KSystemControl::GenerateRandomRange(i, cur_alloc_count - 1)]);
|
std::swap(region_layouts[cur_region_index + i], region_layouts[cur_region_index + KSystemControl::GenerateRandomRange(i, cur_alloc_count - 1)]);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
for (size_t i = 0; i < cur_alloc_count - 1; ++i) {
|
for (size_t i = 0; i < cur_alloc_count - 1; ++i) {
|
||||||
|
|
Loading…
Reference in a new issue