hash/siphash: correct the update loop bounds
This commit is contained in:
parent
cc3153123e
commit
f962653818
@ -101,7 +101,7 @@ siphash<C,D>::operator() (cruft::view<const uint8_t*> data) const noexcept
|
||||
|
||||
// update
|
||||
auto cursor = data.begin ();
|
||||
for ( ; data.end () - cursor > 8; cursor += sizeof (uint64_t)) {
|
||||
for ( ; data.end () - cursor >= 8; cursor += sizeof (uint64_t)) {
|
||||
auto word = readle<uint64_t> (cursor);
|
||||
|
||||
state[3] ^= word;
|
||||
|
Loading…
Reference in New Issue
Block a user