diff options
| author | Robert Drehmel <robert@FreeBSD.org> | 2002-06-18 09:42:18 +0000 |
|---|---|---|
| committer | Robert Drehmel <robert@FreeBSD.org> | 2002-06-18 09:42:18 +0000 |
| commit | a9eec9f11925f870a07e039c973909cc7a2b96ef (patch) | |
| tree | 4f36fdc773dfefc95a8baacee0f0f16c2e45c3d9 /lib | |
| parent | 412ffd386f7f2b1884817550a07f3cc35867d983 (diff) | |
Notes
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/libc/stdio/mktemp.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/libc/stdio/mktemp.c b/lib/libc/stdio/mktemp.c index 870e4db37597..c5ade5335e0c 100644 --- a/lib/libc/stdio/mktemp.c +++ b/lib/libc/stdio/mktemp.c @@ -128,7 +128,7 @@ _gettemp(path, doopen, domkdir, slen) } /* Fill space with random characters */ - while (*trv == 'X') { + while (trv >= path && *trv == 'X') { rand = arc4random() % (sizeof(padchar) - 1); *trv-- = padchar[rand]; } |
