🔨 fixed fuzz code to avoid false positives in case of discarded values
This commit is contained in:
parent
e2c5913a50
commit
4d1eaace8c
1 changed files with 5 additions and 0 deletions
|
@ -33,6 +33,11 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size)
|
||||||
std::vector<uint8_t> vec1(data, data + size);
|
std::vector<uint8_t> vec1(data, data + size);
|
||||||
json j1 = json::from_bson(vec1);
|
json j1 = json::from_bson(vec1);
|
||||||
|
|
||||||
|
if (j1.is_discarded())
|
||||||
|
{
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
// step 2: round trip
|
// step 2: round trip
|
||||||
|
|
Loading…
Reference in a new issue