From dec202e6d6c41f99c0a5dbc8178f0c11babf3d82 Mon Sep 17 00:00:00 2001 From: WilliamParks Date: Thu, 15 Jun 2023 15:53:22 -0400 Subject: [PATCH] Fixes math with register offsets (#1314) --- libafl_frida/src/asan/asan_rt.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libafl_frida/src/asan/asan_rt.rs b/libafl_frida/src/asan/asan_rt.rs index 6998e5d136..7f5b88f75a 100644 --- a/libafl_frida/src/asan/asan_rt.rs +++ b/libafl_frida/src/asan/asan_rt.rs @@ -2416,7 +2416,7 @@ impl AsanRuntime { } X86Register::Rdi => { // In this case rdi is already clobbered, so we want it from the stack (we pushed rdi onto stack before!) - writer.put_mov_reg_reg_offset_ptr(X86Register::Rsi, X86Register::Rsp, -0x28); + writer.put_mov_reg_reg_offset_ptr(X86Register::Rsi, X86Register::Rsp, 0x20); } X86Register::Rsp => { // In this case rsp is also clobbered