Skip to content

Commit

Permalink
fix(hooks): include <iterator>, abort if trampoline allocation failed
Browse files Browse the repository at this point in the history
  • Loading branch information
Curve committed May 12, 2024
1 parent 36a67b2 commit 982d0ac
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/hooks.hook.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

#include <limits>
#include <cassert>
#include <iterator>
#include <algorithm>

namespace lime
Expand Down Expand Up @@ -196,6 +197,11 @@ namespace lime
trampoline = page::allocate(size, rwx);
}

if (!trampoline)
{
return false;
}

auto content = prologue;
content.reserve(size);

Expand Down

0 comments on commit 982d0ac

Please sign in to comment.