From f43b7248e3fe35aa85cc2163e56c26b11c3fcbc5 Mon Sep 17 00:00:00 2001 From: Theo de Raadt Date: Wed, 4 Mar 1998 02:34:50 +0000 Subject: uninitialized case; bde --- lib/libc/stdio/mktemp.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'lib/libc') diff --git a/lib/libc/stdio/mktemp.c b/lib/libc/stdio/mktemp.c index d54deceb503..f4e5e0f29fa 100644 --- a/lib/libc/stdio/mktemp.c +++ b/lib/libc/stdio/mktemp.c @@ -32,7 +32,7 @@ */ #if defined(LIBC_SCCS) && !defined(lint) -static char rcsid[] = "$OpenBSD: mktemp.c,v 1.10 1997/10/07 22:21:34 millert Exp $"; +static char rcsid[] = "$OpenBSD: mktemp.c,v 1.11 1998/03/04 02:34:49 deraadt Exp $"; #endif /* LIBC_SCCS and not lint */ #include @@ -115,13 +115,14 @@ _gettemp(path, doopen, domkdir) c = (pid - 26) + 'a'; *trv-- = c; } + start = trv + 1; /* * check the target directory; if you have six X's and it * doesn't exist this runs for a *very* long time. */ if (doopen || domkdir) { - for (start = trv + 1;; --trv) { + for (;; --trv) { if (trv <= path) break; if (*trv == '/') { -- cgit v1.2.3