diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2018-07-28 11:06:48 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2018-07-28 11:06:48 +0000 |
commit | 93c1b73a09a52d4a265f683bf1954b08bb430049 (patch) | |
tree | 5543464d74945196cc890e9d9099e5d0660df7eb /test/fuzzer/ThreeBytes.cpp | |
parent | 0d8e7490d6e8a13a8f0977d9b7771803b9f64ea0 (diff) |
Notes
Diffstat (limited to 'test/fuzzer/ThreeBytes.cpp')
-rw-r--r-- | test/fuzzer/ThreeBytes.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/test/fuzzer/ThreeBytes.cpp b/test/fuzzer/ThreeBytes.cpp new file mode 100644 index 000000000000..754a5b0b56a1 --- /dev/null +++ b/test/fuzzer/ThreeBytes.cpp @@ -0,0 +1,14 @@ +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. + +// Find FUZ +#include <cstddef> +#include <cstdint> +#include <cstdlib> + +extern "C" int LLVMFuzzerTestOneInput(const uint8_t *Data, size_t Size) { + if (Size < 3) return 0; + uint32_t x = Data[0] + 251 * Data[1] + 251 * 251 * Data[2]; + if (x == 'F' + 251 * 'U' + 251 * 251 * 'Z') abort(); + return 0; +} |