summaryrefslogtreecommitdiff
path: root/lib/libc/stdio
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2008-07-22 21:47:46 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2008-07-22 21:47:46 +0000
commit59e24e00344933c83781a4833897f7769c0250af (patch)
treec2b8cb5f33b2756789aa692b56867071aec9df2e /lib/libc/stdio
parent67edb7190234e821e69193e278fd34217ab55af4 (diff)
use arc4random_uniform(); ok djm millert
Diffstat (limited to 'lib/libc/stdio')
-rw-r--r--lib/libc/stdio/mktemp.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/libc/stdio/mktemp.c b/lib/libc/stdio/mktemp.c
index 687ec8c7063..a613daea5bf 100644
--- a/lib/libc/stdio/mktemp.c
+++ b/lib/libc/stdio/mktemp.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: mktemp.c,v 1.20 2007/10/21 11:09:30 tobias Exp $ */
+/* $OpenBSD: mktemp.c,v 1.21 2008/07/22 21:47:45 deraadt Exp $ */
/*
* Copyright (c) 1987, 1993
* The Regents of the University of California. All rights reserved.
@@ -109,7 +109,7 @@ _gettemp(char *path, int *doopen, int domkdir, int slen)
while (trv >= path && *trv == 'X') {
char c;
- pid = (arc4random() & 0xffff) % (26+26);
+ pid = arc4random_uniform(26+26);
if (pid < 26)
c = pid + 'A';
else