🔨 fixed fuzz code to avoid false positives in case of discarded values

parent e2c5913a
...@@ -33,6 +33,11 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) ...@@ -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
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment