Skip to content

Commit

Permalink
Merge pull request #4952 from ligfx/fix_10110
Browse files Browse the repository at this point in the history
PatchEngine: check instruction at link addr is non-zero
  • Loading branch information
degasus committed Feb 24, 2017
2 parents 25fc7ed + da35abb commit 1f04bab
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Source/Core/Core/PatchEngine.cpp
Expand Up @@ -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()
Expand Down

0 comments on commit 1f04bab

Please sign in to comment.