Skip to content

Commit

Permalink
🚑 fix for #519
Browse files Browse the repository at this point in the history
Added catch branch for out_of_range exception that can occur if input
file contains a number overflow.
  • Loading branch information
nlohmann committed Mar 17, 2017
1 parent f547679 commit 31a6c09
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions test/src/fuzzer-parse_json.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,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&)
{
// parse errors are ok, because input may be random bytes
}

// return 0 - non-zero return values are reserved for future use
return 0;
Expand Down

0 comments on commit 31a6c09

Please sign in to comment.