Bug 901963 - Fix crash in mozilla::plugins::PluginInstanceChild::SetWindowLongPtrWHook on Win64. r=ehsan

This commit is contained in:
Ryan VanderMeulen 2013-08-07 15:32:28 -04:00
Родитель f2b8591e0b
Коммит fb600bf758
1 изменённых файлов: 2 добавлений и 2 удалений

Просмотреть файл

@ -492,7 +492,7 @@ protected:
(origBytes[nBytes+1] & 0x07) == 0x5) {
// [rip+disp32]
// convert JMP 32bit offset to JMP 64bit direct
directJmpAddr = (byteptr_t)*((uint64_t*)(origBytes + nBytes + 6 + (*((uint32_t*)(origBytes + nBytes + 2)))));
directJmpAddr = (byteptr_t)*((uint64_t*)(origBytes + nBytes + 6 + (*((int32_t*)(origBytes + nBytes + 2)))));
nBytes += 6;
} else {
// not support yet!
@ -517,7 +517,7 @@ protected:
} else if (origBytes[nBytes] == 0xe9) {
pJmp32 = nBytes;
// convert JMP 32bit offset to JMP 64bit direct
directJmpAddr = origBytes + pJmp32 + 5 + (*((uint32_t*)(origBytes + pJmp32 + 1)));
directJmpAddr = origBytes + pJmp32 + 5 + (*((int32_t*)(origBytes + pJmp32 + 1)));
// jmp 32bit offset
nBytes += 5;
} else if (origBytes[nBytes] == 0xff) {