Merge pull request #4952 from ligfx/fix_10110

PatchEngine: check instruction at link addr is non-zero
This commit is contained in:
Markus Wick 2017-02-24 11:08:15 +01:00 committed by GitHub
commit 1f04bab967
1 changed files with 2 additions and 1 deletions

View File

@ -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()