From f962653818447e2f7b33b648c803ca5abb462609 Mon Sep 17 00:00:00 2001 From: Danny Robson Date: Thu, 21 Jul 2022 14:23:17 +1000 Subject: [PATCH] hash/siphash: correct the update loop bounds --- hash/siphash.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hash/siphash.cpp b/hash/siphash.cpp index a45b6663..fa79b4a8 100644 --- a/hash/siphash.cpp +++ b/hash/siphash.cpp @@ -101,7 +101,7 @@ siphash::operator() (cruft::view 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 (cursor); state[3] ^= word;