summaryrefslogtreecommitdiff
path: root/usr.bin
diff options
context:
space:
mode:
authorTodd C. Miller <millert@cvs.openbsd.org>1996-10-28 00:42:22 +0000
committerTodd C. Miller <millert@cvs.openbsd.org>1996-10-28 00:42:22 +0000
commit80d7d1c114846899763db2618aec0607f9458dad (patch)
tree1253c154fcd93f118ae88c442e63171b5fec6728 /usr.bin
parent2108268e48704604a61d3039259401d83164d1cf (diff)
Ignore $HOME if > MAXPATHLEN
Diffstat (limited to 'usr.bin')
-rw-r--r--usr.bin/mail/temp.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.bin/mail/temp.c b/usr.bin/mail/temp.c
index 53b3eb1d911..108e5bc0874 100644
--- a/usr.bin/mail/temp.c
+++ b/usr.bin/mail/temp.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: temp.c,v 1.3 1996/09/16 02:26:09 deraadt Exp $ */
+/* $OpenBSD: temp.c,v 1.4 1996/10/28 00:42:21 millert Exp $ */
/* $NetBSD: temp.c,v 1.5 1996/06/08 19:48:42 christos Exp $ */
/*
@@ -38,7 +38,7 @@
#if 0
static char sccsid[] = "@(#)temp.c 8.1 (Berkeley) 6/6/93";
#else
-static char rcsid[] = "$OpenBSD: temp.c,v 1.3 1996/09/16 02:26:09 deraadt Exp $";
+static char rcsid[] = "$OpenBSD: temp.c,v 1.4 1996/10/28 00:42:21 millert Exp $";
#endif
#endif /* not lint */
@@ -92,7 +92,7 @@ tinit()
} else
myname = savestr(cp);
}
- if ((cp = getenv("HOME")) == NOSTR)
+ if ((cp = getenv("HOME")) == NOSTR || strlen(getenv("HOME")) >= PATHSIZE)
cp = ".";
homedir = savestr(cp);
if (debug)