BackPatch: make sure MOVBE is long enough

This commit is contained in:
Tillmann Karras 2014-04-24 11:15:52 +02:00
parent acfd9ee76c
commit 1f2e551c8c
1 changed files with 6 additions and 0 deletions

View File

@ -187,6 +187,12 @@ const u8 *Jitx86Base::BackPatch(u8 *codePtr, u32 emAddress, void *ctx_void)
return nullptr;
}
if (info.byteSwap && info.instructionSize < 5)
{
PanicAlert("BackPatch: MOVBE is too small");
return nullptr;
}
auto it = registersInUseAtLoc.find(codePtr);
if (it == registersInUseAtLoc.end())
{