Skip to content

Commit

Permalink
add protect
Browse files Browse the repository at this point in the history
  • Loading branch information
dankmeme01 committed Apr 27, 2024
1 parent 7fa328b commit 4dab052
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/Handler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ Result<> Handler::init() {
auto target = m_modifiedBytes.size();

auto address = reinterpret_cast<uint8_t*>(Target::get().getRealPtr(m_address));
Target::get().protectMemory(address, target, VM_PROT_READ | VM_PROT_EXECUTE);
m_originalBytes.insert(m_originalBytes.begin(), address, address + target);

TULIP_HOOK_UNWRAP_INTO(auto trampolineOffset, generator->relocateOriginal(target));
Expand Down

0 comments on commit 4dab052

Please sign in to comment.