Thus spake Kris Kennaway <[EMAIL PROTECTED]>: > On Mon, Feb 17, 2003 at 04:40:48PM +1100, Tim Robbins wrote: > > > I disagree. It's safe to use rand() in games and in certain kinds of > > simulations when you don't care that the distribution isn't quite > > uniform, or when you prefer speed over quality. I don't think rand() > > needs a warning message like gets() &c. because it's not as dangerous. > > The problem is that there are a number of applications that use it > when they should not. I've given examples of two of them, and there > are probably lots of others I haven't noticed. For example, I just > checked, and libICE appears to use rand() for cookie generation. This > is completely bogus, and insecure. > > Note that I was only suggesting this patch be committed to -current > for purposes of finding out what these applications are, and fixing > them as appropriate.
Then how about wrapping the warning in an #ifdef, so people who want to find inappropriate uses of rand() can do so for as long as they want, and everyone else who uses -CURRENT is not affected? To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-current" in the body of the message