aboutsummaryrefslogtreecommitdiff
path: root/frida_mode/test/unstable/unstable.c
diff options
context:
space:
mode:
authorvan Hauser <vh@thc.org>2022-08-04 21:36:59 +0200
committerGitHub <noreply@github.com>2022-08-04 21:36:59 +0200
commit4b9c560b07e1ea42633b59e0eb94f7a3f0fe0c58 (patch)
treea00dcc353fd4add31a2c1e75bc2a4ac79419570c /frida_mode/test/unstable/unstable.c
parent6056d4b140f0665c6a701cada9166379be3435ac (diff)
parent9d5a2d1b8e6f4ead25a857d106b37fd85950aff3 (diff)
downloadAFLplusplus-4b9c560b07e1ea42633b59e0eb94f7a3f0fe0c58.tar.gz
Merge pull request #1486 from WorksButNotTested/be8
Be8
Diffstat (limited to 'frida_mode/test/unstable/unstable.c')
-rw-r--r--frida_mode/test/unstable/unstable.c7
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");