diff options
| author | Your Name <you@example.com> | 2022-05-12 16:54:40 +0100 |
|---|---|---|
| committer | Your Name <you@example.com> | 2022-05-12 16:54:40 +0100 |
| commit | 3dc72ffb6be7f9acb9788d5cfa8d99c557418621 (patch) | |
| tree | 2cc0db1d117f2990e772ef0adddd70276753e9bd /frida_mode/test/dynamic/testinstrlib.c | |
| parent | ca361e1b6a7228e1f854aa6884cf98f4e9a21486 (diff) | |
| download | afl++-3dc72ffb6be7f9acb9788d5cfa8d99c557418621.tar.gz | |
Added test for prefetch validation
Diffstat (limited to 'frida_mode/test/dynamic/testinstrlib.c')
| -rw-r--r-- | frida_mode/test/dynamic/testinstrlib.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/frida_mode/test/dynamic/testinstrlib.c b/frida_mode/test/dynamic/testinstrlib.c new file mode 100644 index 00000000..987cbf91 --- /dev/null +++ b/frida_mode/test/dynamic/testinstrlib.c @@ -0,0 +1,14 @@ +#include <stdio.h> + +void testinstrlib(char *buf, int len) { + if (len < 1) return; + buf[len] = 0; + + // we support three input cases + if (buf[0] == '0') + printf("Looks like a zero to me!\n"); + else if (buf[0] == '1') + printf("Pretty sure that is a one!\n"); + else + printf("Neither one or zero? How quaint!\n"); +} |
