From ee01ca5f1e82ce49ea6a7768276f83b3a38a6a99 Mon Sep 17 00:00:00 2001 From: Andrew Noyes Date: Tue, 30 Jan 2024 11:56:26 -0800 Subject: [PATCH] Add forgotten file --- FuzzTestDriver.cpp | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 FuzzTestDriver.cpp diff --git a/FuzzTestDriver.cpp b/FuzzTestDriver.cpp new file mode 100644 index 0000000..a05c364 --- /dev/null +++ b/FuzzTestDriver.cpp @@ -0,0 +1,16 @@ +#include +#include +#include +#include + +extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size); + +int main(int argc, char **argv) { + for (int i = 1; i < argc; ++i) { + std::ifstream t(argv[i], std::ios::binary); + std::stringstream buffer; + buffer << t.rdbuf(); + auto str = buffer.str(); + LLVMFuzzerTestOneInput((const uint8_t *)str.data(), str.size()); + } +}