From 898607164bdf15e11a347b104c06a10f000200dd Mon Sep 17 00:00:00 2001 From: ache Date: Sun, 15 Jun 1997 18:23:19 +0000 Subject: srandomdev: use stack junk value in the fallback code too --- lib/libc/stdlib/random.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/libc/stdlib/random.c b/lib/libc/stdlib/random.c index 2c4e234..4737e40 100644 --- a/lib/libc/stdlib/random.c +++ b/lib/libc/stdlib/random.c @@ -30,7 +30,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: random.c,v 1.8 1997/03/29 19:55:03 ache Exp $ + * $Id: random.c,v 1.9 1997/06/14 00:13:56 ache Exp $ * */ @@ -307,9 +307,10 @@ srandomdev() if (!done) { struct timeval tv; + unsigned long junk; gettimeofday(&tv, NULL); - srandom(getpid() ^ tv.tv_sec ^ tv.tv_usec); + srandom(getpid() ^ tv.tv_sec ^ tv.tv_usec ^ junk); return; } -- cgit v1.1