diff options
author | van Hauser <vh@thc.org> | 2020-06-09 19:25:09 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-06-09 19:25:09 +0200 |
commit | 12bdefe00e38cdc3dd8cb028eeac325ab2e94e16 (patch) | |
tree | 0d321d362a19ff19a4a98dcd1b9b72601945695f /examples/aflpp_driver/aflpp_driver_test.cpp | |
parent | 748238d6ab4aeb7f34958d4c37c5ef200ad22463 (diff) | |
parent | 81829d132bebcb42c0e289bb5788b8f2b29c1599 (diff) | |
download | afl++-12bdefe00e38cdc3dd8cb028eeac325ab2e94e16.tar.gz |
Merge pull request #392 from AFLplusplus/dev
Push to master
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; + +} |