Skip to content

Commit 31a6c09

Browse files
committed
🚑 fix for #519
Added catch branch for out_of_range exception that can occur if input file contains a number overflow.
1 parent f547679 commit 31a6c09

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

test/src/fuzzer-parse_json.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,10 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size)
5959
{
6060
// parse errors are ok, because input may be random bytes
6161
}
62+
catch (const json::out_of_range&)
63+
{
64+
// parse errors are ok, because input may be random bytes
65+
}
6266

6367
// return 0 - non-zero return values are reserved for future use
6468
return 0;

0 commit comments

Comments
 (0)