diff options
| author | WorksButNotTested <62701594+WorksButNotTested@users.noreply.github.com> | 2021-06-25 22:14:27 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-06-25 23:14:27 +0200 |
| commit | 6a3877dcd35d31eb79bebbc30ffe70ac0342743e (patch) | |
| tree | f3ddccc0e1315a728fe5b12fdf10990f48f05298 /frida_mode/test/persistent_ret/testinstr.c | |
| parent | c88b98d1c91b37c1941483980161bd46cb03c4d5 (diff) | |
| download | afl++-6a3877dcd35d31eb79bebbc30ffe70ac0342743e.tar.gz | |
Improved FRIDA mode scripting support (#994)
Co-authored-by: Your Name <you@example.com>
Diffstat (limited to 'frida_mode/test/persistent_ret/testinstr.c')
| -rw-r--r-- | frida_mode/test/persistent_ret/testinstr.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/frida_mode/test/persistent_ret/testinstr.c b/frida_mode/test/persistent_ret/testinstr.c index 6cb88a50..42e3519a 100644 --- a/frida_mode/test/persistent_ret/testinstr.c +++ b/frida_mode/test/persistent_ret/testinstr.c @@ -17,13 +17,14 @@ #include <unistd.h> #ifdef __APPLE__ - #define TESTINSTR_SECTION + #define MAIN_SECTION #else - #define TESTINSTR_SECTION __attribute__((section(".testinstr"))) + #define MAIN_SECTION __attribute__((section(".main"))) #endif -void testinstr(char *buf, int len) { +void LLVMFuzzerTestOneInput(char *buf, int len) { + printf (">>> LLVMFuzzerTestOneInput >>>\n"); if (len < 1) return; buf[len] = 0; @@ -43,7 +44,7 @@ void slow() { } -TESTINSTR_SECTION int main(int argc, char **argv) { +MAIN_SECTION int main(int argc, char **argv) { char * file; int fd = -1; @@ -101,7 +102,7 @@ TESTINSTR_SECTION int main(int argc, char **argv) { dprintf(STDERR_FILENO, "Running: %s: (%zd bytes)\n", file, n_read); - testinstr(buf, len); + LLVMFuzzerTestOneInput(buf, len); dprintf(STDERR_FILENO, "Done: %s: (%zd bytes)\n", file, n_read); slow(); |
