diff options
-rw-r--r-- | libdislocator/libdislocator.so.c | 3 | ||||
-rwxr-xr-x | test/test.sh | 4 |
2 files changed, 3 insertions, 4 deletions
diff --git a/libdislocator/libdislocator.so.c b/libdislocator/libdislocator.so.c index 9a2ab004..31884545 100644 --- a/libdislocator/libdislocator.so.c +++ b/libdislocator/libdislocator.so.c @@ -31,10 +31,9 @@ #endif #ifdef __linux__ -#if __GLIBC__ >= 2 || __GLIBC_MINOR >= 25 -#define _GNU_SOURCE #include <unistd.h> #include <sys/syscall.h> +#ifdef __NR_getrandom #define arc4random_buf(p, l) do { ssize_t rd = syscall(__NR_getrandom, p, l, 0); if (rd != l) DEBUGF("getrandom failed"); } while(0) #else #include <time.h> diff --git a/test/test.sh b/test/test.sh index 89f90a29..06040335 100755 --- a/test/test.sh +++ b/test/test.sh @@ -426,9 +426,9 @@ test -e ../libradamsa.so && { test -e test-instr.plain && { mkdir -p in echo 0 > in/in - $ECHO "$GREY[*] running afl-fuzz with radamsa, this will take approx 10 seconds" + $ECHO "$GREY[*] running afl-fuzz with radamsa, this will take approx 15 seconds" { - ../afl-fuzz -RR -V10 -m ${MEM_LIMIT} -i in -o out -- ./test-instr.plain >>errors 2>&1 + ../afl-fuzz -RR -V15 -m ${MEM_LIMIT} -i in -o out -- ./test-instr.plain >>errors 2>&1 } >>errors 2>&1 test -n "$( ls out/queue/id:000002* 2> /dev/null )" && { $ECHO "$GREEN[+] libradamsa performs good - and very slow - mutations" |