artulab
projects
/
openbsd
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
fcbc759
)
use arc4random_uniform(); ok djm millert
author
deraadt
<deraadt@openbsd.org>
Tue, 22 Jul 2008 21:47:45 +0000
(21:47 +0000)
committer
deraadt
<deraadt@openbsd.org>
Tue, 22 Jul 2008 21:47:45 +0000
(21:47 +0000)
lib/libc/stdio/mktemp.c
patch
|
blob
|
history
diff --git
a/lib/libc/stdio/mktemp.c
b/lib/libc/stdio/mktemp.c
index
687ec8c
..
a613dae
100644
(file)
--- a/
lib/libc/stdio/mktemp.c
+++ b/
lib/libc/stdio/mktemp.c
@@
-1,4
+1,4
@@
-/* $OpenBSD: mktemp.c,v 1.2
0 2007/10/21 11:09:30 tobias
Exp $ */
+/* $OpenBSD: mktemp.c,v 1.2
1 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