summaryrefslogtreecommitdiff
path: root/lib/libc
diff options
context:
space:
mode:
authorRobert Drehmel <robert@FreeBSD.org>2002-05-23 14:21:02 +0000
committerRobert Drehmel <robert@FreeBSD.org>2002-05-23 14:21:02 +0000
commitccccc4e1c30b19912fe9681d6097edfb7fd11991 (patch)
tree0ed7fada3c34a8ff733f955a82139978d839193c /lib/libc
parent0bf831c43ef8b5e048ec5b8ba5aa5d587924e6dc (diff)
Notes
Diffstat (limited to 'lib/libc')
-rw-r--r--lib/libc/stdio/mktemp.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/libc/stdio/mktemp.c b/lib/libc/stdio/mktemp.c
index 826f2bc013ee..49ba17d2f420 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];
}