about summary refs log tree commit diff
diff options
context:
space:
mode:
authorDominik Maier <domenukk@gmail.com>2020-03-30 16:46:50 +0200
committerDominik Maier <domenukk@gmail.com>2020-04-01 13:10:06 +0200
commit1e290542bb77f35d1e7bb340077f1c28c0b03b81 (patch)
tree467783f7687347e64eac7e28715c67c5e1778eea
parent245304f5938a700e93a3403b30509dea55a6549e (diff)
downloadafl++-1e290542bb77f35d1e7bb340077f1c28c0b03b81.tar.gz
rebase
-rw-r--r--src/afl-fuzz-mutators.c4
-rwxr-xr-xtest/test.sh6
2 files changed, 5 insertions, 5 deletions
diff --git a/src/afl-fuzz-mutators.c b/src/afl-fuzz-mutators.c
index 754b2190..1a5528a2 100644
--- a/src/afl-fuzz-mutators.c
+++ b/src/afl-fuzz-mutators.c
@@ -193,8 +193,8 @@ void load_custom_mutator(afl_state_t *afl, const char *fn) {
 
   /* Initialize the custom mutator */
   if (afl->mutator->afl_custom_init)
-    afl->mutator->data =
-        afl->mutator->afl_custom_init(afl, rand_below(afl, 0xFFFFFFFF));
+    afl->mutator->data = afl->mutator->afl_custom_init(
+      afl, rand_below(afl, 0xFFFFFFFF));
 
 }
 
diff --git a/test/test.sh b/test/test.sh
index 725ae9e4..0d3c7199 100755
--- a/test/test.sh
+++ b/test/test.sh
@@ -895,12 +895,12 @@ test -d ../unicorn_mode/unicornafl && {
 
 $ECHO "$BLUE[*] Testing: custom mutator"
 unset AFL_CC  # Line 474 sets AFL_CC to "gcc". We reset it to use the default compiler
-CUSTOM_MUTATOR_PATH=../examples/custom_mutators
+CUSTOM_MUTATOR_PATH=$( realpath ../examples/custom_mutators )
 test -e test-custom-mutator.c -a -e ${CUSTOM_MUTATOR_PATH}/example.c -a -e ${CUSTOM_MUTATOR_PATH}/example.c && {
   # Compile the vulnerable program
-  ../afl-clang-fast -o test-custom-mutator test-custom-mutator.c
+  ../afl-clang-fast -o test-custom-mutator test-custom-mutator.c > /dev/null 2>&1
   # Compile the custom mutator
-  make -C ../examples/custom_mutators libexamplemutator.so
+  make -C ../examples/custom_mutators libexamplemutator.so > /dev/null 2>&1
   test -e test-custom-mutator -a -e ${CUSTOM_MUTATOR_PATH}/libexamplemutator.so && {
     # Create input directory
     mkdir -p in