diff options
| author | Michael Maltese <michaeljosephmaltese@gmail.com> | 2017-02-22 20:12:19 -0800 |
|---|---|---|
| committer | Michael Maltese <michaeljosephmaltese@gmail.com> | 2017-02-22 21:14:57 -0800 |
| commit | da35abbbe2d09735b26d7d2ea3c0aeba7edaba18 (patch) | |
| tree | 482a984935e1f2ad4cfb013e3bb0684af8da9941 /Source | |
| parent | 9b0ce3190607ae28e2f2d45bec1a3a604904fdc9 (diff) | |
PatchEngine: check instruction at link addr is non-zero
Regression introduced in #4738. Fixes
https://bugs.dolphin-emu.org/issues/10110.
Diffstat (limited to 'Source')
| -rw-r--r-- | Source/Core/Core/PatchEngine.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Source/Core/Core/PatchEngine.cpp b/Source/Core/Core/PatchEngine.cpp index 58207da6c5..7fea082b63 100644 --- a/Source/Core/Core/PatchEngine.cpp +++ b/Source/Core/Core/PatchEngine.cpp @@ -223,7 +223,8 @@ static bool IsStackSane() return false; // Check the link register makes sense (that it points to a valid IBAT address) - return PowerPC::HostIsInstructionRAMAddress(PowerPC::HostRead_U32(next_SP + 4)); + const u32 address = PowerPC::HostRead_U32(next_SP + 4); + return PowerPC::HostIsInstructionRAMAddress(address) && 0 != PowerPC::HostRead_U32(address); } bool ApplyFramePatches() |
