vnmakarov / mum-hash

Hashing functions and PRNGs based on them
145 stars 12 forks source link

Access to primes[] out of bounds #11

Closed paulie-g closed 5 years ago

paulie-g commented 5 years ago

This code in the inner loop of the hash assumes _mum_primes has an infinite number of elements and will produce non-deterministic output for any key longer than ((16 + _MUM_UNROLL_FACTOR) * sizeof(uint64_t) + 7)

for (i = 0; i < n; i++)
    result ^= _mum (_mum_le (((uint64_t *) str)[i]), _mum_primes[i]);
paulie-g commented 5 years ago

Disregard, shouldn't be posting late at night :)