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

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