From 7461c52278ff3a96ebc4d71d369d3a8b24fd19b1 Mon Sep 17 00:00:00 2001 From: Your Name Date: Tue, 11 Oct 2022 18:15:51 +0100 Subject: Fixes for x64 --- frida_mode/hook/frida_hook.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'frida_mode/hook/frida_hook.c') 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 -- cgit 1.4.1