aboutsummaryrefslogtreecommitdiff
path: root/subhook_unix.c
AgeCommit message (Collapse)AuthorFilesLines
2023-02-10Fix compile error and clean up in *nix-specific codeZeex1-20/+25
2021-12-05unix: Fix unprotecting memory across a page boundaryCampbell Suter1-3/+8
Previously, we'd round the address to unprotect to the nearest page but keep the length the same. This meant that if we were hooking a function that started just before the end of a page, it would need both pages to be unprotected but we'd only unprotect the first one.
2021-11-20Removing subhook_macos.cDudi1-1/+19
2020-11-11Don't use MAP_32BIT on macOSZeex1-9/+12
This flag requires use of entitlements i.e. code signing...
2020-11-02Fix segfault in subhook_new()Zeex1-1/+1
This fixes #51.
2020-11-02Add null check in subhok_free_code()Zeex1-0/+3
2020-11-02Fix undefined symbol errorZeex1-1/+4
2020-11-02Fix address overflow in trampolineZeex1-6/+17
Allocate memory for storing the trampoline code via mmap() with MAP_32BIT flag to make sure that it stays withing 2GB range. Also, add missing calls to subhook_free() in the C test program (C++ calls it implicitly already via destructor).
2018-11-22Cleanup and code style fixseZeex1-1/+2
2018-09-03Clean up and improve commentsZeex1-4/+4
* Replace SUBHOOK_BITS equality comparisons with SUBHOOK_X86_64 macro definition checks (less error-prone) * Improve comments in subhook_disasm() and remove unused variable (address_size) * Update copyright year across all files
2016-08-28Add support for Mac OSZeex1-0/+41