about summary refs log tree commit diff
path: root/frida_mode/hook/frida_hook.c
diff options
context:
space:
mode:
authorvan Hauser <vh@thc.org>2024-06-10 22:24:25 +0200
committerGitHub <noreply@github.com>2024-06-10 22:24:25 +0200
commita37c7e124622c73ef21a4a97eb3f590dfca63e3f (patch)
tree324fee063d80a1fe52162a480b1e89ff1628f2b4 /frida_mode/hook/frida_hook.c
parent8e50c0c103cade9723f115fc92e3065f64c79713 (diff)
parent392dcd57c61de8d909ffeb5baa73beccfef66bc0 (diff)
downloadafl++-a37c7e124622c73ef21a4a97eb3f590dfca63e3f.tar.gz
Merge pull request #2119 from WorksButNotTested/frida-persistent
Frida persistent
Diffstat (limited to 'frida_mode/hook/frida_hook.c')
-rw-r--r--frida_mode/hook/frida_hook.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/frida_mode/hook/frida_hook.c b/frida_mode/hook/frida_hook.c
index da1a59b2..59a92e7e 100644
--- a/frida_mode/hook/frida_hook.c
+++ b/frida_mode/hook/frida_hook.c
@@ -31,8 +31,8 @@ __attribute__((visibility("default"))) void afl_persistent_hook(
   // do a length check matching the target!
 
   void **esp = (void **)regs->esp;
-  void  *arg1 = esp[0];
-  void **arg2 = &esp[1];
+  void  *arg1 = esp[1];
+  void **arg2 = &esp[2];
   memcpy(arg1, input_buf, input_buf_len);
   *arg2 = (void *)input_buf_len;