Add fuzzing by way of ClusterFuzzLite

Signed-off-by: David Korczynski <david@adalogics.com>
This commit is contained in:
David Korczynski
2023-12-23 01:12:21 -08:00
parent c32a20e1ee
commit 828afc3b1e
6 changed files with 62 additions and 0 deletions

View File

@@ -0,0 +1,16 @@
#include <toml.hpp>
#include <sstream>
#include <string>
extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) {
std::string s(reinterpret_cast<const char *>(data), size);
std::istringstream iss(s);
try {
const auto ref = toml::parse(iss);
} catch (...) {
}
return 0;
}