mirror of
https://github.com/zeek/zeek.git
synced 2025-10-16 21:48:21 +00:00
Use full digest length instead of just one byte.
When our universal hash function fell back to MD5 for inputs larger than supported by H3, the computation only returned the first byte of the MD5 result instead of as many bytes as needed to cover sizeof(Hasher::digest).
This commit is contained in:
parent
8ec8dfa705
commit
1d50874256
1 changed files with 1 additions and 1 deletions
|
@ -108,7 +108,7 @@ Hasher::digest UHF::hash(const void* x, size_t n) const
|
|||
|
||||
MD5(d, 16, d);
|
||||
|
||||
return d[0];
|
||||
return *reinterpret_cast<const Hasher::digest*>(d);
|
||||
}
|
||||
|
||||
DefaultHasher::DefaultHasher(size_t k, size_t seed)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue