diff options
author | Andrea Fioraldi <andreafioraldi@gmail.com> | 2020-02-08 18:07:39 +0100 |
---|---|---|
committer | Andrea Fioraldi <andreafioraldi@gmail.com> | 2020-02-08 18:07:39 +0100 |
commit | e6685436d8c8e5a346b3aa10b9d28098c1ca2dd7 (patch) | |
tree | 62e8b70a8210da308620b71fab193f71bfef2a8a /examples/qemu_persistent_hook | |
parent | 5fa4f47baec7e3dc78e685f9f8a44bf34c3eba53 (diff) | |
parent | a93e11b79702eece7bda93bc8646c0bb9c2b0b64 (diff) | |
download | afl++-e6685436d8c8e5a346b3aa10b9d28098c1ca2dd7.tar.gz |
Merge branch 'master' of github.com:vanhauser-thc/AFLplusplus
Diffstat (limited to 'examples/qemu_persistent_hook')
-rw-r--r-- | examples/qemu_persistent_hook/read_into_rdi.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/examples/qemu_persistent_hook/read_into_rdi.c b/examples/qemu_persistent_hook/read_into_rdi.c index fd4c9000..3994e790 100644 --- a/examples/qemu_persistent_hook/read_into_rdi.c +++ b/examples/qemu_persistent_hook/read_into_rdi.c @@ -37,8 +37,12 @@ enum { void afl_persistent_hook(uint64_t* regs, uint64_t guest_base) { + // In this example the register RDI is pointing to the memory location + // of the target buffer, and the length of the input is in RAX. + printf("reading into %p\n", regs[R_EDI]); size_t r = read(0, g2h(regs[R_EDI]), 1024); + regs[R_EAX] = r; printf("readed %ld bytes\n", r); } |