summaryrefslogtreecommitdiff
path: root/usr.sbin/named/nslookup
diff options
context:
space:
mode:
authorTodd C. Miller <millert@cvs.openbsd.org>2000-08-02 04:10:51 +0000
committerTodd C. Miller <millert@cvs.openbsd.org>2000-08-02 04:10:51 +0000
commiteb9184a174a8fb2f98f2f1418f87863716a5c115 (patch)
tree02b606fefe2b41782be054be7fdd586e53befba0 /usr.sbin/named/nslookup
parent3602a750205b32f442e2e132baa5b3e9a3c83349 (diff)
$HOME paranoia: never use getenv("HOME") w/o checking for NULL and non-zero
Diffstat (limited to 'usr.sbin/named/nslookup')
-rw-r--r--usr.sbin/named/nslookup/main.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.sbin/named/nslookup/main.c b/usr.sbin/named/nslookup/main.c
index c32792e7350..0bfe66079f8 100644
--- a/usr.sbin/named/nslookup/main.c
+++ b/usr.sbin/named/nslookup/main.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: main.c,v 1.7 1999/06/10 22:38:03 pjanzen Exp $ */
+/* $OpenBSD: main.c,v 1.8 2000/08/02 04:10:50 millert Exp $ */
/*
* ++Copyright++ 1985, 1989
@@ -66,7 +66,7 @@ char copyright[] =
static char sccsid[] = "@(#)main.c 5.42 (Berkeley) 3/3/91";
static char rcsid[] = "$From: main.c,v 8.4 1996/11/11 06:36:54 vixie Exp $";
#else
-static char rcsid[] = "$OpenBSD: main.c,v 1.7 1999/06/10 22:38:03 pjanzen Exp $";
+static char rcsid[] = "$OpenBSD: main.c,v 1.8 2000/08/02 04:10:50 millert Exp $";
#endif
#endif /* not lint */
@@ -1123,7 +1123,7 @@ ReadRC()
register char *cp;
char buf[PATH_MAX];
- if ((cp = getenv("HOME")) != NULL &&
+ if ((cp = getenv("HOME")) != NULL && *cp != '\0' &&
(strlen(cp) + strlen(_PATH_NSLOOKUPRC)) < sizeof(buf)) {
(void) strncpy(buf, cp, sizeof buf - 1);