mirror of
https://github.com/fmtlib/fmt.git
synced 2024-12-27 03:21:34 +00:00
Fix float fuzzer
This commit is contained in:
parent
8d3fd86d6d
commit
bd3c792507
@ -28,7 +28,7 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) {
|
||||
char* ptr = nullptr;
|
||||
if (std::strtod(buffer.data(), &ptr) != value)
|
||||
throw std::runtime_error("round trip failure");
|
||||
if (ptr != buffer.end())
|
||||
if (ptr + 1 != buffer.end())
|
||||
throw std::runtime_error("unparsed output");
|
||||
return 0;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user