1
0
mirror of https://github.com/nlohmann/json.git synced 2025-07-25 13:41:56 +03:00

🚑 adjusted Fuzzer to new parser

out_of_range exceptions where unexpected before - the parser used to crash in these situations...
This commit is contained in:
Niels Lohmann
2018-05-28 17:57:22 +02:00
parent db03d09312
commit a49644ab74
3 changed files with 12 additions and 0 deletions

View File

@ -63,6 +63,10 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size)
{
// parse errors are ok, because input may be random bytes
}
catch (const json::out_of_range&)
{
// out of range errors may happen if provided sizes are excessive
}
// return 0 - non-zero return values are reserved for future use
return 0;