diff options
author | van Hauser <vh@thc.org> | 2024-07-14 11:23:51 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-07-14 11:23:51 +0200 |
commit | 19ca7b3761f5abff8b72770d6bbfbde80ef5b985 (patch) | |
tree | 62e6316d91ea348228fe3471bfa59ee01e0e393e /frida_mode/hook/qemu_hook.c | |
parent | 53409530b369e560c7f6f37ead5a5db9e116efd0 (diff) | |
parent | 55a2362348cd467b65d6aea33e93ec44c6de1a38 (diff) | |
download | afl++-19ca7b3761f5abff8b72770d6bbfbde80ef5b985.tar.gz |
Merge pull request #2158 from AFLplusplus/dev
push to stable
Diffstat (limited to 'frida_mode/hook/qemu_hook.c')
-rw-r--r-- | frida_mode/hook/qemu_hook.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/frida_mode/hook/qemu_hook.c b/frida_mode/hook/qemu_hook.c index 56e787e3..d7d45974 100644 --- a/frida_mode/hook/qemu_hook.c +++ b/frida_mode/hook/qemu_hook.c @@ -36,7 +36,7 @@ struct x86_64_regs { void afl_persistent_hook(struct x86_64_regs *regs, uint64_t guest_base, uint8_t *input_buf, uint32_t input_buf_len) { - (void)guest_base; /* unused */ + (void)guest_base; /* unused */ memcpy((void *)regs->rdi, input_buf, input_buf_len); regs->rsi = input_buf_len; @@ -76,14 +76,15 @@ struct x86_regs { void afl_persistent_hook(struct x86_regs *regs, uint64_t guest_base, uint8_t *input_buf, uint32_t input_buf_len) { - (void)guest_base; /* unused */ + (void)guest_base; /* unused */ void **esp = (void **)regs->esp; - void * arg1 = esp[1]; + void *arg1 = esp[1]; void **arg2 = &esp[2]; memcpy(arg1, input_buf, input_buf_len); *arg2 = (void *)input_buf_len; } + #elif defined(__aarch64__) struct arm64_regs { @@ -177,9 +178,10 @@ struct arm64_regs { void afl_persistent_hook(struct arm64_regs *regs, uint64_t guest_base, uint8_t *input_buf, uint32_t input_buf_len) { - (void)guest_base; /* unused */ + (void)guest_base; /* unused */ memcpy((void *)regs->x0, input_buf, input_buf_len); regs->x1 = input_buf_len; + } #else @@ -193,3 +195,4 @@ int afl_persistent_hook_init(void) { return 1; } + |