summaryrefslogtreecommitdiff
path: root/bin/csh/csh.c
diff options
context:
space:
mode:
authorTodd C. Miller <millert@cvs.openbsd.org>1996-10-27 23:42:55 +0000
committerTodd C. Miller <millert@cvs.openbsd.org>1996-10-27 23:42:55 +0000
commit8437a0e3a9806aeeb4f89f74f71b6732458c6bb6 (patch)
treea1bf227d16de80e61824808607eb903b089a3890 /bin/csh/csh.c
parent393aee94c02512403fbe69a995a15d6e59a2d187 (diff)
Don't honor $HOME if >= MAXPATHLEN
Diffstat (limited to 'bin/csh/csh.c')
-rw-r--r--bin/csh/csh.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/bin/csh/csh.c b/bin/csh/csh.c
index cd3b7c3e878..64319064ca9 100644
--- a/bin/csh/csh.c
+++ b/bin/csh/csh.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: csh.c,v 1.2 1996/06/23 14:19:16 deraadt Exp $ */
+/* $OpenBSD: csh.c,v 1.3 1996/10/27 23:42:54 millert Exp $ */
/* $NetBSD: csh.c,v 1.14 1995/04/29 23:21:28 mycroft Exp $ */
/*-
@@ -44,7 +44,7 @@ static char copyright[] =
#if 0
static char sccsid[] = "@(#)csh.c 8.2 (Berkeley) 10/12/93";
#else
-static char rcsid[] = "$OpenBSD: csh.c,v 1.2 1996/06/23 14:19:16 deraadt Exp $";
+static char rcsid[] = "$OpenBSD: csh.c,v 1.3 1996/10/27 23:42:54 millert Exp $";
#endif
#endif /* not lint */
@@ -233,7 +233,7 @@ main(argc, argv)
*/
set(STRstatus, Strsave(STR0));
- if ((tcp = getenv("HOME")) != NULL)
+ if ((tcp = getenv("HOME")) != NULL && strlen(tcp) < MAXPATHLEN)
cp = SAVE(tcp);
else
cp = NULL;