diff options
author | 1996-10-27 23:42:54 +0000 | |
---|---|---|
committer | 1996-10-27 23:42:54 +0000 | |
commit | 8512aa64b6906e78dff7b5ae1ec4918c0d4a85dd (patch) | |
tree | 07fb0736cced5ddbf144b804c2f75691a6c72e4c /bin/csh/csh.c | |
parent | Check for __OpenBSD__. From Matthieu Herrb <Mathieu.Herrb@mipnet.fr> (diff) | |
download | wireguard-openbsd-8512aa64b6906e78dff7b5ae1ec4918c0d4a85dd.tar.xz wireguard-openbsd-8512aa64b6906e78dff7b5ae1ec4918c0d4a85dd.zip |
Don't honor $HOME if >= MAXPATHLEN
Diffstat (limited to 'bin/csh/csh.c')
-rw-r--r-- | bin/csh/csh.c | 6 |
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; |