[Freeipa-devel] [PATCH] Improvements to collection API
Dmitri Pal
dpal at redhat.com
Tue Jun 30 18:28:42 UTC 2009
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
--
Thank you,
Dmitri Pal
Engineering Manager IPA project,
Red Hat Inc.
-------------------------------
Looking to carve out IT costs?
www.redhat.com/carveoutcosts/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Adding-INSERT-into-collection-functionality.patch
Type: text/x-patch
Size: 174434 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/freeipa-devel/attachments/20090630/9d43224e/attachment.bin>
More information about the Freeipa-devel
mailing list