🐛 add missing EOF check

parent a9117828
...@@ -2016,6 +2016,10 @@ class binary_reader ...@@ -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 ...@@ -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);
} }
......
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