From 3562de440e53fca7109a314dcc7fe9ab07794e56 Mon Sep 17 00:00:00 2001 From: Your Name Date: Thu, 4 Aug 2022 18:46:29 +0100 Subject: Changes to add option for absolute coverage data --- frida_mode/test/unstable/unstable.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'frida_mode/test') 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 #include #include +#include #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"); -- cgit 1.4.1