mirror of
https://github.com/nlohmann/json.git
synced 2025-07-22 15:21:52 +03:00
🚑 fix for #405
This commit is contained in:
@ -540,4 +540,11 @@ TEST_CASE("regression tests")
|
||||
CHECK(j.is_number_float());
|
||||
CHECK(j.dump() == "1.66020696663386e+20");
|
||||
}
|
||||
|
||||
SECTION("issue #405 - Heap-buffer-overflow (OSS-Fuzz issue 342)")
|
||||
{
|
||||
// original test case
|
||||
std::vector<uint8_t> vec {0x65, 0xf5, 0x0a, 0x48, 0x21};
|
||||
CHECK_THROWS_AS(json::from_cbor(vec), std::out_of_range);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user