diff options
-rw-r--r-- | lib/libc/stdio/mktemp.c | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/lib/libc/stdio/mktemp.c b/lib/libc/stdio/mktemp.c index 3f35659021f..b0d18fa7cbc 100644 --- a/lib/libc/stdio/mktemp.c +++ b/lib/libc/stdio/mktemp.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mktemp.c,v 1.27 2009/03/20 16:05:11 millert Exp $ */ +/* $OpenBSD: mktemp.c,v 1.28 2010/02/08 17:58:24 guenther Exp $ */ /* * Copyright (c) 1996-1998, 2008 Theo de Raadt * Copyright (c) 1997, 2008-2009 Todd C. Miller @@ -44,11 +44,6 @@ mktemp_internal(char *path, int slen, int mode) size_t len; int fd; - if (*path == '\0') { - errno = EINVAL; - return(-1); - } - len = strlen(path); if (len == 0 || slen >= len) { errno = EINVAL; @@ -57,7 +52,7 @@ mktemp_internal(char *path, int slen, int mode) ep = path + len - slen; tries = 1; - for (start = ep; start >= path && *--start == 'X';) { + for (start = ep; start > path && *--start == 'X';) { if (tries < INT_MAX / NUM_CHARS) tries *= NUM_CHARS; } |