Fix off-by-one comparison error when unpickling uint32_t.
This commit is contained in:
parent
bdd73c5c32
commit
131f7cfd71
1 changed files with 1 additions and 1 deletions
|
@ -30,7 +30,7 @@ std::uint8_t const * olm::unpickle(
|
|||
std::uint32_t & value
|
||||
) {
|
||||
value = 0;
|
||||
if (!pos || end <= pos + 4) return nullptr;
|
||||
if (!pos || end < pos + 4) return nullptr;
|
||||
for (unsigned i = 4; i--;) { value <<= 8; value |= *(pos++); }
|
||||
return pos;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue