diff options
| author | Your Name <you@example.com> | 2022-08-04 18:46:29 +0100 |
|---|---|---|
| committer | Your Name <you@example.com> | 2022-08-04 18:46:29 +0100 |
| commit | 3562de440e53fca7109a314dcc7fe9ab07794e56 (patch) | |
| tree | 70a814a9ed0c04f9ecf72b807e326ffe118cde09 /frida_mode/test | |
| parent | 98e883875548c12d022adf556f9a95babb38c200 (diff) | |
| download | afl++-3562de440e53fca7109a314dcc7fe9ab07794e56.tar.gz | |
Changes to add option for absolute coverage data
Diffstat (limited to 'frida_mode/test')
| -rw-r--r-- | frida_mode/test/unstable/unstable.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/frida_mode/test/unstable/unstable.c b/frida_mode/test/unstable/unstable.c index 915e283f..7d16c26c 100644 --- a/frida_mode/test/unstable/unstable.c +++ b/frida_mode/test/unstable/unstable.c @@ -14,6 +14,7 @@ #include <stdint.h> #include <stdio.h> #include <stdlib.h> +#include <sys/time.h> #ifdef __APPLE__ #define TESTINSTR_SECTION @@ -25,8 +26,10 @@ void LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) { if (size < 1) return; - int r = rand(); - if ((r % 2) == 0) { + struct timeval tv = {0}; + if (gettimeofday(&tv, NULL) < 0) return; + + if ((tv.tv_usec % 2) == 0) { printf ("Hooray all even\n"); } else { printf ("Hmm that's odd\n"); |
