diff options
author | van Hauser <vh@thc.org> | 2020-06-06 11:45:08 +0200 |
---|---|---|
committer | van Hauser <vh@thc.org> | 2020-06-06 11:45:08 +0200 |
commit | 372206e159f4f3d150543411872319fb8fae0b66 (patch) | |
tree | ca044eec884e61328a78371798c7172c74a62ff9 /examples/aflpp_driver/aflpp_driver_test.cpp | |
parent | c036108b59ffc98ff8515c94450a036c506b592c (diff) | |
download | afl++-372206e159f4f3d150543411872319fb8fae0b66.tar.gz |
aflpp_debug
Diffstat (limited to 'examples/aflpp_driver/aflpp_driver_test.cpp')
-rw-r--r-- | examples/aflpp_driver/aflpp_driver_test.cpp | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/examples/aflpp_driver/aflpp_driver_test.cpp b/examples/aflpp_driver/aflpp_driver_test.cpp new file mode 100644 index 00000000..81aa9db4 --- /dev/null +++ b/examples/aflpp_driver/aflpp_driver_test.cpp @@ -0,0 +1,20 @@ +#include <stdio.h> +#include <stdlib.h> +#include <stdint.h> + +extern "C" int LLVMFuzzerTestOneInput(const uint8_t *Data, size_t Size) { + + fprintf(stderr, "Received size %lu\n", Size); + + if (Size < 4) + return 0; + + if (Data[0] == 'F') + if (Data[1] == 'A') + if (Data[2] == '$') + if (Data[3] == '$') + abort(); + + return 0; + +} |