In message <[EMAIL PROTECTED]>, "Andrey A. Chernov" writes: > >--SUOF0GtieIMvvwua >Content-Type: text/plain; charset=us-ascii >Content-Disposition: inline >Content-Transfer-Encoding: quoted-printable > >On Sun, Feb 02, 2003 at 01:11:06 -0800, Kris Kennaway wrote: >>=20 >> Another problem (noticed by tjr) is that once the sequence hits '0' it >> jumps to INT_MAX and stays there forever. For example, seeding with >> srand(0) produces nothing but INT_MAX from rand(). >>=20 >> It looks like a lot more validation of this PRNG is needed. > >Don't have an idea about this thing yet, maybe some sign or variable size= >=20 >change fix required. > >BTW, note that new formulae also used in the kernel (by BSD developers) >and taken from there - libkern/random.c - so all you say is true there >too.
It should be nuked from the kernel, and arc4random() used instead. -- Poul-Henning Kamp | UNIX since Zilog Zeus 3.20 [EMAIL PROTECTED] | TCP/IP since RFC 956 FreeBSD committer | BSD since 4.3-tahoe Never attribute to malice what can adequately be explained by incompetence. To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-current" in the body of the message