Comment 20 for bug 269188

Revision history for this message
In , Wan-Teh Chang (wtc-google) wrote :

Mike, Gavin, thanks for finding the users of PR_GetRandomNoise.

Among them, only nsMetricsService.cpp is using PR_GetRandomNoise
incorrectly. It uses PR_GetRandomNoise directly to generate a
random 32-bit number.

The problem of using PR_GetRandomNoise as a PRNG is that the
output of PR_GetRandomNoise, although random, may not be
uniformly distributed. This is why we need to feed it to
a PRNG to "whiten" the output.