🐛 fix for #962

Added out_of_range exception for UBJSON containers with sizes that exceed the target container's max_size.
This commit is contained in:
Niels Lohmann
2018-02-06 22:38:53 +01:00
parent 8b457ace25
commit 33a9b00ce6
5 changed files with 53 additions and 6 deletions

View File

@@ -58,6 +58,10 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size)
{
// type errors can occur during parsing, too
}
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;