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
parent d4081c07e9
commit e8416c9ae6

View File

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