🐛 add missing EOF check

This commit is contained in:
Niels Lohmann 2020-07-20 22:40:28 +02:00
parent a9117828e1
commit 1339d6b683
No known key found for this signature in database
GPG key ID: 7F3CEA63AE251B69
2 changed files with 8 additions and 0 deletions

View file

@ -2016,6 +2016,10 @@ class binary_reader
for (std::size_t i = 0; i < size; ++i)
{
get();
if (JSON_HEDLEY_UNLIKELY(!unexpect_eof(input_format_t::ubjson, "number")))
{
return false;
}
number_vector.push_back(current);
}

View file

@ -9516,6 +9516,10 @@ class binary_reader
for (std::size_t i = 0; i < size; ++i)
{
get();
if (JSON_HEDLEY_UNLIKELY(!unexpect_eof(input_format_t::ubjson, "number")))
{
return false;
}
number_vector.push_back(current);
}