diff options
author | vanhauser-thc <vh@thc.org> | 2020-12-01 14:40:30 +0100 |
---|---|---|
committer | vanhauser-thc <vh@thc.org> | 2020-12-01 14:40:30 +0100 |
commit | c05e4efbe9b4e7d1ff078b7a392621f2ca7572e6 (patch) | |
tree | e005593b09169435cbad53c9990c6485e8fd9d06 /utils/qemu_persistent_hook/test.c | |
parent | 8584f9d2b5de9687c518c672e471f4f8cd9166fa (diff) | |
download | afl++-c05e4efbe9b4e7d1ff078b7a392621f2ca7572e6.tar.gz |
renamed examples/ to utils/
Diffstat (limited to 'utils/qemu_persistent_hook/test.c')
-rw-r--r-- | utils/qemu_persistent_hook/test.c | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/utils/qemu_persistent_hook/test.c b/utils/qemu_persistent_hook/test.c new file mode 100644 index 00000000..afeff202 --- /dev/null +++ b/utils/qemu_persistent_hook/test.c @@ -0,0 +1,35 @@ +#include <stdio.h> + +int target_func(unsigned char *buf, int size) { + + printf("buffer:%p, size:%p\n", buf, size); + switch (buf[0]) { + + case 1: + if (buf[1] == '\x44') { puts("a"); } + break; + case 0xff: + if (buf[2] == '\xff') { + + if (buf[1] == '\x44') { puts("b"); } + + } + + break; + default: + break; + + } + + return 1; + +} + +char data[1024]; + +int main() { + + target_func(data, 1024); + +} + |