Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixed detour_alloc_trampoline_allocate_new
detour_alloc_trampoline_allocate_new(pbTarget, pLo, pHi) was designed with the assumption that pbTarget is going to be between pLo and pHi. In our case, 32-bit cscript!mainCRTStartup was loaded at 0x34020, i.e. pbTarget was below pLo (which was fixed to 0x80000 in detour_2gb_below), and therefore: - detour_alloc_region_from_hi(pLo, pbTarget) did not do anything - detour_alloc_region_from_lo(pbTarget, pHi) allocated a 64 KiB block below pLo (in our case happened to be 0x70000) which was later discarded and NULL returned in detour_alloc_trampoline The fix clamps pbTarget into [pLo, pHi] range.
- Loading branch information