apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bojan Smojver" <bo...@rexursive.com>
Subject Re: Hash collision vectors in APR?
Date Fri, 27 Jan 2012 11:19:19 GMT
------- Original message -------
> From: Branko ─îibej

> But the original code is already wrong in assuming that res->hash_func
> and overlay->hash_func are the same, so in fact you're silently fixing a
> bug with the current change. :)

Surprisingly enough, I actually thought about this bit. Surely two hashes tables with different
hash functions would have different hash values.

But, we can still use your optimisation with reverse xor (which I did not think of at all).
We can check whether both input hashes have the same hash function pointer and use your optimisation
in that case.

Once again, thanks for your input!

--
Bojan
Mime
View raw message