diff options
author | 2008-07-22 21:47:45 +0000 | |
---|---|---|
committer | 2008-07-22 21:47:45 +0000 | |
commit | 9cd68eec3a29f75c396b6b60c1d14818a5aba3f3 (patch) | |
tree | 3f667123992ebb806322f64bf618613020c3f9ef /lib/libc/stdio/mktemp.c | |
parent | FAKE (the variable) died about 2 years ago... (diff) | |
download | wireguard-openbsd-9cd68eec3a29f75c396b6b60c1d14818a5aba3f3.tar.xz wireguard-openbsd-9cd68eec3a29f75c396b6b60c1d14818a5aba3f3.zip |
use arc4random_uniform(); ok djm millert
Diffstat (limited to 'lib/libc/stdio/mktemp.c')
-rw-r--r-- | lib/libc/stdio/mktemp.c | 4 |
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 |