Open flylinfan opened 9 years ago
Fix for anyone who stumbles upon the same problem:
// last entry points to the current head of the free list
pRetVal[trampolineCount - 1].pNextTrampoline = g_pFreeList;
+if (g_pFreeList) {
+ g_pFreeList->pPrevTrampoline = &pRetVal[trampolineCount - 1];
+}
The follow statement will cause crash when allocate the second block trampoline area in win7 x64. // last entry points to the current head of the free list pRetVal[trampolineCount - 1].pNextTrampoline = g_pFreeList; in mhook.cpp BlockAlloc function.This statement repeat use the first trampoline in the first block.