mirror of
https://github.com/monero-project/monero.git
synced 2026-06-12 19:11:36 -07:00
Merge pull request #10639
1bed4e8 serialization: handle EOF at varint boundary (selsta)
This commit is contained in:
@@ -147,7 +147,7 @@ struct binary_archive<false> : public binary_archive_base<false>
|
||||
{
|
||||
auto current = bytes_.cbegin();
|
||||
auto end = bytes_.cend();
|
||||
good_ &= (0 <= tools::read_varint(current, end, v));
|
||||
good_ &= (1 <= tools::read_varint(current, end, v));
|
||||
current = std::min(current, bytes_.cend());
|
||||
bytes_ = {current, std::size_t(bytes_.cend() - current)};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user