On 1/10/2012 5:29 PM, Chris Darroch wrote: > Bojan Smojver wrote: > >> On Fri, 2012-01-06 at 10:52 +1100, Bojan Smojver wrote: >>> + if (apr_generate_random_bytes( >>> + (unsigned char *)&ht->seed, sizeof(ht->seed)) != APR_SUCCESS) >>> + return NULL; >> >> Chris, >> >> What I mean is, instead of return NULL, we could have ht->seed = >> (unsigned int) ht. Not as random as /dev/urandom, but probably better >> than zero.
Or, rather, ht->seed = (unsigned int)ht - 1 to avoid the obviousness of folding on even values.