diff options
author | van Hauser <vh@thc.org> | 2020-06-17 15:05:14 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-06-17 15:05:14 +0200 |
commit | 0dc9967984df3f9c250d4c27b6de1cbd4cac3eb3 (patch) | |
tree | ca6096f1d22ba87c262bdeaf57455520ef3143e2 /examples/aflpp_driver/aflpp_driver_test.cpp | |
parent | 12bdefe00e38cdc3dd8cb028eeac325ab2e94e16 (diff) | |
parent | 889e54eab858b1928f74a8c179b32275b62f2286 (diff) | |
download | afl++-0dc9967984df3f9c250d4c27b6de1cbd4cac3eb3.tar.gz |
Merge pull request #403 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 | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/examples/aflpp_driver/aflpp_driver_test.cpp b/examples/aflpp_driver/aflpp_driver_test.cpp index 81aa9db4..799c743d 100644 --- a/examples/aflpp_driver/aflpp_driver_test.cpp +++ b/examples/aflpp_driver/aflpp_driver_test.cpp @@ -1,19 +1,21 @@ #include <stdio.h> #include <stdlib.h> #include <stdint.h> +#include "hash.h" extern "C" int LLVMFuzzerTestOneInput(const uint8_t *Data, size_t Size) { - fprintf(stderr, "Received size %lu\n", Size); + fprintf(stderr, "FUNC crc: %08x len: %lu\n", hash32(Data, Size, 0xa5b35705), Size); - if (Size < 4) + if (Size < 5) return 0; if (Data[0] == 'F') if (Data[1] == 'A') if (Data[2] == '$') if (Data[3] == '$') - abort(); + if (Data[4] == '$') + abort(); return 0; |