]> git.saurik.com Git - apple/libc.git/blame - stdio/FreeBSD/mktemp.c.patch
Libc-763.13.tar.gz
[apple/libc.git] / stdio / FreeBSD / mktemp.c.patch
CommitLineData
1f2f436a
A
1--- mktemp.c.orig 2010-04-08 10:37:06.000000000 -0700
2+++ mktemp.c 2010-04-08 10:40:05.000000000 -0700
3@@ -130,7 +130,7 @@ _gettemp(path, doopen, domkdir, slen)
59e0d9fe 4
1f2f436a
A
5 /* Fill space with random characters */
6 while (trv >= path && *trv == 'X') {
7- rand = arc4random_uniform(sizeof(padchar) - 1);
8+ rand = arc4random() % (sizeof(padchar) - 1);
9 *trv-- = padchar[rand];
59e0d9fe
A
10 }
11 start = trv + 1;