[Freeipa-devel] [PATCH] Improvements to collection API

Stephen Gallagher sgallagh at redhat.com
Wed Jul 1 13:18:38 UTC 2009


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 07/01/2009 09:12 AM, Stephen Gallagher wrote:
> On 06/30/2009 02:28 PM, Dmitri Pal wrote:
>> Stephen Gallagher wrote:
>>> On 06/29/2009 06:34 PM, Dmitri Pal wrote:
>>>>> Nack.
>>>>>
>>>>> Your PRIME hash function is dangerously limited. You guarantee an
>>>>> overflow on 64-bit systems with strings of 13 characters or more. Worse
>>>>> on 32 bit systems. At minimum, declare phash a uint64_t.
>>> Furthermore, in
>>>>> your algorithm, the strings "mystring" and "mystirng" will produce an
>>>>> identical hash. Consider locating a library that provides a safer and
>>>>> less collision-prone hash. (I have no recommendations, perhaps someone
>>>>> else on the list can help.)
>>>>>
>>>>> Beyond that, I'm not going to look too deeply into the internals.
>>>>> Syntactically everything looks fine on a quick scan. It compiles
>>> cleanly
>>>>> against the current head and does not break any existing code, so once
>>>>> the above change is made, I'm comfortable with committing it and
>>> working
>>>>> out any bugs later on.
>>>>>
>> The updated patch with more advanced hash is attached.
> 
>> _______________________________________________
>> Freeipa-devel mailing list
>> Freeipa-devel at redhat.com
>> https://www.redhat.com/mailman/listinfo/freeipa-devel
> 
> 
> 
> 
> 
> These changes look good to me.
> Ack.
> 

Pushed to master.
_______________________________________________
Freeipa-devel mailing list
Freeipa-devel at redhat.com
https://www.redhat.com/mailman/listinfo/freeipa-devel


- -- 
Stephen Gallagher
RHCE 804006346421761

Looking to carve out IT costs?
www.redhat.com/carveoutcosts/
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org/

iEYEARECAAYFAkpLYh4ACgkQeiVVYja6o6MNjACfXBVunb6UTPriokNjrVFTrOrb
QPQAn2LLsZH1MzzbZdm8hzqmXuHueNl4
=C18b
-----END PGP SIGNATURE-----




More information about the Freeipa-devel mailing list