Skip to content

Commit

Permalink
Check against page baseAddress, not allocationBase
Browse files Browse the repository at this point in the history
  • Loading branch information
Burnt-o authored Jan 24, 2025
1 parent 8fd3c9e commit 9eec2cb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/os.windows.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -272,8 +272,8 @@ void trap_threads(uint8_t* from, uint8_t* to, size_t len, const std::function<vo
new_protect = PAGE_EXECUTE_READWRITE;
}

if (from_mbi.AllocationBase == virtual_protect_mbi.AllocationBase ||
to_mbi.AllocationBase == virtual_protect_mbi.AllocationBase) {
if (from_mbi.BaseAddress == virtual_protect_mbi.BaseAddress ||
to_mbi.BaseAddress == virtual_protect_mbi.BaseAddress) {
new_protect = PAGE_EXECUTE_READWRITE;
}

Expand Down

0 comments on commit 9eec2cb

Please sign in to comment.