summaryrefslogtreecommitdiff
path: root/usr.bin
diff options
context:
space:
mode:
authorChristian Weisgerber <naddy@cvs.openbsd.org>2013-08-26 14:15:09 +0000
committerChristian Weisgerber <naddy@cvs.openbsd.org>2013-08-26 14:15:09 +0000
commite81ecaa8ba7ff1bb04641c78e74b3ff9340627cf (patch)
tree6e9ade750e4154e3d3971c94676bf6746c1a97ba /usr.bin
parent615ee12ec399029b7e8a4272bc38a7ae68e02025 (diff)
replace rand(3)/random(3) calls with secure arc4random*()
npppd ok yasuoka@ ok millert@
Diffstat (limited to 'usr.bin')
-rw-r--r--usr.bin/make/engine.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.bin/make/engine.c b/usr.bin/make/engine.c
index ddc8dbc1010..c37ef64b2e5 100644
--- a/usr.bin/make/engine.c
+++ b/usr.bin/make/engine.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: engine.c,v 1.45 2013/05/30 08:58:38 espie Exp $ */
+/* $OpenBSD: engine.c,v 1.46 2013/08/26 14:15:07 naddy Exp $ */
/*
* Copyright (c) 2012 Marc Espie.
*
@@ -792,7 +792,7 @@ do_run_command(Job *job)
*/
if (random_delay)
if (!(runningJobs == NULL && no_jobs_left()))
- usleep(random() % random_delay);
+ usleep(arc4random_uniform(random_delay));
run_command(cmd, errCheck);
/*NOTREACHED*/
default: