mirror of
https://github.com/nlohmann/json.git
synced 2025-08-06 07:02:42 +03:00
🐛 add missing EOF check
This commit is contained in:
@@ -2016,6 +2016,10 @@ class binary_reader
|
|||||||
for (std::size_t i = 0; i < size; ++i)
|
for (std::size_t i = 0; i < size; ++i)
|
||||||
{
|
{
|
||||||
get();
|
get();
|
||||||
|
if (JSON_HEDLEY_UNLIKELY(!unexpect_eof(input_format_t::ubjson, "number")))
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
number_vector.push_back(current);
|
number_vector.push_back(current);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -9516,6 +9516,10 @@ class binary_reader
|
|||||||
for (std::size_t i = 0; i < size; ++i)
|
for (std::size_t i = 0; i < size; ++i)
|
||||||
{
|
{
|
||||||
get();
|
get();
|
||||||
|
if (JSON_HEDLEY_UNLIKELY(!unexpect_eof(input_format_t::ubjson, "number")))
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
number_vector.push_back(current);
|
number_vector.push_back(current);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user