MMU/PatchEngine: Fix potential crash during stack probe
TryReadInstruction doesn't validate the address it resolves, that can result in Memory::GetPointer failing and returning nullptr which then leads to a nullptr dereference and a crash. Created PowerPC::HostIsInstructionRAMAddress which works the same way as PowerPC::HostIsRAMAddress for the IBAT.
This commit is contained in:
1 parent
bd2881ff86
commit
49873b1287
3 files changed
+20
-12
No files matched your search
@@ -220,6 +220,8 @@ void HostWrite_U64(const u64 var, const u32 address);
|
||||
// Returns whether a read or write to the given address will resolve to a RAM
|
||||
// access given the current CPU state.
|
||||
bool HostIsRAMAddress(const u32 address);
|
||||
// Same as HostIsRAMAddress, but uses IBAT instead of DBAT.
|
||||
bool HostIsInstructionRAMAddress(u32 address);
|
||||
|
||||
std::string HostGetString(u32 em_address, size_t size = 0);
|
||||
|
||||
|
||||
Reference in new issue
Block a user