1
0
mirror of https://github.com/nlohmann/json.git synced 2025-08-09 05:22:48 +03:00

BSON: throw json.exception.out_of_range.407 in case a value of type std::uint64_t is serialized to BSON. Also, added a missing EOF-check to binary_reader.

This commit is contained in:
Julian Becker
2018-10-16 19:13:07 +02:00
parent df0f612d1b
commit 5bccacda30
5 changed files with 376 additions and 6 deletions

View File

@@ -256,6 +256,11 @@ class binary_reader
{
while (auto element_type = get())
{
if (JSON_UNLIKELY(not unexpect_eof()))
{
return false;
}
const std::size_t element_type_parse_position = chars_read;
string_t key;
if (JSON_UNLIKELY(not get_bson_cstr(key)))