Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 25 Feb 2001 17:22:36 +1100 (EST)
From:      Bruce Evans <bde@zeta.org.au>
To:        Kris Kennaway <kris@obsecurity.org>
Cc:        Robert Watson <rwatson@FreeBSD.org>, Nick Sayer <nsayer@FreeBSD.org>, cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org
Subject:   Re: cvs commit: ports/astro/xglobe/files patch-random
Message-ID:  <Pine.BSF.4.21.0102251713590.5810-100000@besplex.bde.org>
In-Reply-To: <20010224202345.A15392@mollari.cthul.hu>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sat, 24 Feb 2001, Kris Kennaway wrote:

> How about this also:
> 
> Index: stdlib/rand.c
> ===================================================================
> RCS file: /mnt/ncvs/src/lib/libc/stdlib/rand.c,v
> retrieving revision 1.2
> diff -u -r1.2 rand.c
> --- stdlib/rand.c	1999/05/24 23:30:12	1.2
> +++ stdlib/rand.c	2001/02/25 04:13:07
> @@ -50,6 +50,8 @@
>  	return ((*ctx = *ctx * 1103515245 + 12345) % ((u_long)RAND_MAX + 1));
>  }
>  
> +__warn_references(rand_r,
> +	"warning: rand_r() does not produce high-quality random numbers and should not generally be used");
...

No.  rand_r() should be generally used because it is standard.  It is the
implementor's fault that it is low-quality (unlike for gets(), which is
broken as designed).

Bruce


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe cvs-all" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.4.21.0102251713590.5810-100000>