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, 13 Jan 2012 08:57:12 GMT
On Thu, 2012-01-12 at 19:58 -0800, Chris Darroch wrote:
> +    if (strcmp(DEV_RANDOM, "/dev/random") != 0 &&
> +        apr_generate_random_bytes((unsigned char *)&ht->seed,
> +                                  sizeof(ht->seed)) != APR_SUCCESS) 

This probably wouldn't work as expected. If you had /dev/random selected
for DEV_RANDOM, the if would fail and srand()/rand() bit would never get
called. No?

-- 
Bojan


Mime
View raw message