diff options
author | van Hauser <vh@thc.org> | 2020-08-17 23:42:45 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-08-17 23:42:45 +0200 |
commit | 0a6084f3613f15d2508d43334d28e671f5c6c573 (patch) | |
tree | a58da1d2ed34cef4020c1fccbd70c4679d7e59fb /examples/aflpp_driver/aflpp_driver_test.c | |
parent | 8044ae28be2dd109ac16719ce2e304074fa74efd (diff) | |
parent | 9532499ef5280ae4c7aa3d189dd7a924a38e8358 (diff) | |
download | afl++-0a6084f3613f15d2508d43334d28e671f5c6c573.tar.gz |
Merge pull request #499 from AFLplusplus/dev
important push to stable
Diffstat (limited to 'examples/aflpp_driver/aflpp_driver_test.c')
-rw-r--r-- | examples/aflpp_driver/aflpp_driver_test.c | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/examples/aflpp_driver/aflpp_driver_test.c b/examples/aflpp_driver/aflpp_driver_test.c index e4567bbf..ddc3effb 100644 --- a/examples/aflpp_driver/aflpp_driver_test.c +++ b/examples/aflpp_driver/aflpp_driver_test.c @@ -4,6 +4,16 @@ #include "hash.h" +void __attribute__((noinline)) crashme(const uint8_t *Data, size_t Size) { + + if (Data[0] == 'F') + if (Data[1] == 'A') + if (Data[2] == '$') + if (Data[3] == '$') + if (Data[4] == '$') abort(); + +} + int LLVMFuzzerTestOneInput(const uint8_t *Data, size_t Size) { fprintf(stderr, "FUNC crc: %016llx len: %lu\n", @@ -13,11 +23,7 @@ int LLVMFuzzerTestOneInput(const uint8_t *Data, size_t Size) { if (Size < 5) return 0; - if (Data[0] == 'F') - if (Data[1] == 'A') - if (Data[2] == '$') - if (Data[3] == '$') - if (Data[4] == '$') abort(); + crashme(Data, Size); return 0; |