diff options
author | van Hauser <vh@thc.org> | 2022-10-12 08:19:28 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-10-12 08:19:28 +0200 |
commit | 77ebab64d3826e0644dc75b05916893ec8929e68 (patch) | |
tree | 17982970cf6923c76b298f74f3fffc9e87dc5844 /frida_mode/hook/frida_hook.c | |
parent | 182013a26f8d3ad16b6b4d8426b061966e849c96 (diff) | |
parent | 939575de4bf55ca8e0bc1c8724f6a382d51e73a3 (diff) | |
download | afl++-77ebab64d3826e0644dc75b05916893ec8929e68.tar.gz |
Merge pull request #1554 from WorksButNotTested/be8
Be8
Diffstat (limited to 'frida_mode/hook/frida_hook.c')
-rw-r--r-- | frida_mode/hook/frida_hook.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/frida_mode/hook/frida_hook.c b/frida_mode/hook/frida_hook.c index 79e2348d..da1a59b2 100644 --- a/frida_mode/hook/frida_hook.c +++ b/frida_mode/hook/frida_hook.c @@ -54,10 +54,12 @@ __attribute__((visibility("default"))) void afl_persistent_hook( __attribute__((visibility("default"))) void afl_persistent_hook( GumCpuContext *regs, uint8_t *input_buf, uint32_t input_buf_len) { + // do a length check matching the target! memcpy((void *)regs->r[0], input_buf, input_buf_len); regs->r[1] = input_buf_len; + } #else |