Bug 1192844: Accept 0xCC padding in WindowsDllDetourPatcher::CreateTrampoline. r=m_kato

--HG--
extra : rebase_source : 6711e475036ea3fe98bb054b79e10ad8d54692fb
This commit is contained in:
David Major 2015-08-12 13:10:04 -04:00
parent 84a436a89b
commit 789b31656d

View File

@ -427,13 +427,13 @@ protected:
while (nBytes < 13) {
// if found JMP 32bit offset, next bytes must be NOP
// if found JMP 32bit offset, next bytes must be NOP or INT3
if (pJmp32 >= 0) {
if (origBytes[nBytes++] != 0x90) {
return;
if (origBytes[nBytes] == 0x90 || origBytes[nBytes] == 0xcc) {
nBytes++;
continue;
}
continue;
return;
}
if (origBytes[nBytes] == 0x0f) {
nBytes++;