diff options
author | van Hauser <vh@thc.org> | 2020-08-12 16:06:30 +0200 |
---|---|---|
committer | van Hauser <vh@thc.org> | 2020-08-12 16:06:30 +0200 |
commit | 7a6867e2f8e8b698c08366f79d0c8751b09ce431 (patch) | |
tree | 9f4c8c3c9414a4c152c5c9d57c183d949d062c55 /examples/aflpp_driver/aflpp_driver_test.c | |
parent | b38837f4ff8f2e52597b7908b9226500e5c61933 (diff) | |
download | afl++-7a6867e2f8e8b698c08366f79d0c8751b09ce431.tar.gz |
split up __afl_manual_init, added internal AFL_DISABLE_LLVM_INSTRUMENTATION, skipping ctor+ifunc functions for all llvm, code-format
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; |