stevemk14ebr / PolyHook_2_0

C++20, x86/x64 Hooking Libary v2.0
MIT License
1.6k stars 226 forks source link

Fix for WINE allocating outside of jump range #168

Closed trumank closed 1 year ago

trumank commented 1 year ago

On WINE, VirtualAlloc2 seems to be returning addresses outside of the requested range, which causes the resulting jump to overflow and jump to invalid memory. This patch detects the faulty alloc and allows falling back to another method if configured to do so.

stevemk14ebr commented 1 year ago

Thanks!