MCPcopy Create free account
hub / github.com/Taywee/args / AttemptConversion

Function AttemptConversion

fuzz/numeric_parser_fuzzer.cpp:26–38  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

24
25template <typename T>
26static T AttemptConversion(args::ValueReader &reader, const std::string &input)
27{
28 T destination{};
29 try
30 {
31 reader("fuzz_test", input, destination);
32 }
33 catch (...)
34 {
35 // Expected rejection for values this type cannot represent.
36 }
37 return destination;
38}
39
40extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) {
41 // Create a string from fuzzer input, preserving embedded NULs

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected