mirror of
https://github.com/Atmosphere-NX/Atmosphere.git
synced 2025-06-21 10:52:50 +02:00
Fix formatting and simplify code
Signed-off-by: Mako <61922615+Makonede@users.noreply.github.com>
This commit is contained in:
parent
96c5f03d36
commit
9c1f7602d6
@ -507,17 +507,7 @@ namespace ams::ldr {
|
|||||||
aslr_slide = GenerateSecureRandom(free_size / os::MemoryBlockUnitSize) * os::MemoryBlockUnitSize;
|
aslr_slide = GenerateSecureRandom(free_size / os::MemoryBlockUnitSize) * os::MemoryBlockUnitSize;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
fs::FileHandle aslr;
|
aslr_start = 0xffe00000;
|
||||||
if (R_SUCCEEDED(fs::OpenFile(std::addressof(aslr), ASLR_CONFIG, fs::OpenMode_Read))) {
|
|
||||||
ON_SCOPE_EXIT { fs::CloseFile(aslr); };
|
|
||||||
|
|
||||||
size_t read_size;
|
|
||||||
uintptr_t address = 0;
|
|
||||||
if (R_SUCCEEDED(fs::ReadFile(std::addressof(read_size), aslr, 0, &address, sizeof address)) && read_size == sizeof address) aslr_start = address;
|
|
||||||
else aslr_start = 0xcafe00000; // FIXME
|
|
||||||
}
|
|
||||||
else aslr_slide = (0xfd000000 / os::MemoryBlockUnitSize) * os::MemoryBlockUnitSize - 0x8000000;
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Set out. */
|
/* Set out. */
|
||||||
|
Loading…
Reference in New Issue
Block a user