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 09b25c4 commit 6b0f5bb
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 @@ -55,6 +55,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 6b0f5bb

Please sign in to comment.