diff options
Diffstat (limited to 'subhook_x86.c')
-rw-r--r-- | subhook_x86.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/subhook_x86.c b/subhook_x86.c index 46645cc..ee0840e 100644 --- a/subhook_x86.c +++ b/subhook_x86.c @@ -354,7 +354,7 @@ SUBHOOK_EXPORT subhook_t SUBHOOK_API subhook_new(void *src, hook->dst = dst; hook->options = options; hook->jmp_size = subhook_get_jmp_size(hook->options); - hook->trampoline_size = hook->jmp_size + MAX_INSN_LEN - 1; + hook->trampoline_size = hook->jmp_size * 2 + MAX_INSN_LEN; hook->trampoline_len = 0; if ((hook->code = malloc(hook->jmp_size)) == NULL) { |