diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 1996-10-27 17:46:41 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 1996-10-27 17:46:41 +0000 |
commit | f1d7a0c415a0f6f0a4abad7d29ece84de602f1a5 (patch) | |
tree | ce7b0ddaee8433b35252231f394cf91f8ff77565 /lib/libc/gen | |
parent | f68f31e3a344327980c1e067535f6ad37efd20bd (diff) |
be careful in the non-setuid case too, what the heck
Diffstat (limited to 'lib/libc/gen')
-rw-r--r-- | lib/libc/gen/glob.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/libc/gen/glob.c b/lib/libc/gen/glob.c index 057a17343cc..21abf96c730 100644 --- a/lib/libc/gen/glob.c +++ b/lib/libc/gen/glob.c @@ -35,7 +35,7 @@ */ #if defined(LIBC_SCCS) && !defined(lint) -static char rcsid[] = "$OpenBSD: glob.c,v 1.3 1996/09/11 19:22:46 deraadt Exp $"; +static char rcsid[] = "$OpenBSD: glob.c,v 1.4 1996/10/27 17:46:40 deraadt Exp $"; #endif /* LIBC_SCCS and not lint */ /* @@ -360,6 +360,9 @@ globtilde(pattern, patbuf, pglob) return pattern; else h = pwd->pw_dir; + } else { + if (strlen(h) >= MAXPATHLEN-1) + return pattern; } } else { |