diff options
author | Dominik Maier <domenukk@gmail.com> | 2020-03-30 18:20:20 +0200 |
---|---|---|
committer | Dominik Maier <domenukk@gmail.com> | 2020-04-01 13:10:07 +0200 |
commit | 710a29a1e0b8c874cdba43a16879f7f77e917713 (patch) | |
tree | 9454d93e5ea4a672ee609d12e286e3a6ad1cdf0c | |
parent | c36c34cf9e3c7f34466efbb191100b6ae699091c (diff) | |
download | afl++-710a29a1e0b8c874cdba43a16879f7f77e917713.tar.gz |
fixed testcase
-rw-r--r-- | test/test-custom-mutator.c | 7 | ||||
-rwxr-xr-x | test/test.sh | 4 |
2 files changed, 4 insertions, 7 deletions
diff --git a/test/test-custom-mutator.c b/test/test-custom-mutator.c index b44c3634..83baafab 100644 --- a/test/test-custom-mutator.c +++ b/test/test-custom-mutator.c @@ -10,11 +10,10 @@ int main(int argc, char *argv[]) { - char str[100]={ }; + char str[100]; read(0, str, 100); - int *ptr = NULL; - if( str[0] == 'P') { - *ptr = 123; + if( str[6] == 'A') { + abort(); } return 0; } diff --git a/test/test.sh b/test/test.sh index 25aaad58..3e1b6c43 100755 --- a/test/test.sh +++ b/test/test.sh @@ -913,9 +913,7 @@ test -e test-custom-mutator.c -a -e ${CUSTOM_MUTATOR_PATH}/example.c -a -e ${CUS # Run afl-fuzz w/ the C mutator $ECHO "$GREY[*] running afl-fuzz for the C mutator, this will take approx 10 seconds" { - export AFL_CUSTOM_MUTATOR_LIBRARY=${CUSTOM_MUTATOR_PATH}/libexamplemutator.so - ../afl-fuzz -V10 -m ${MEM_LIMIT} -i in -o out -- ./test-custom-mutator >>errors 2>&1 - unset AFL_CUSTOM_MUTATOR_LIBRARY + AFL_CUSTOM_MUTATOR_LIBRARY=${CUSTOM_MUTATOR_PATH}/libexamplemutator.so ../afl-fuzz -V10 -m ${MEM_LIMIT} -i in -o out -- ./test-custom-mutator >>errors 2>&1 } >>errors 2>&1 # Check results |