summaryrefslogtreecommitdiff
path: root/usr.sbin
diff options
context:
space:
mode:
Diffstat (limited to 'usr.sbin')
-rw-r--r--usr.sbin/ypserv/ypserv/ypserv_db.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/usr.sbin/ypserv/ypserv/ypserv_db.c b/usr.sbin/ypserv/ypserv/ypserv_db.c
index e6906bfccca..b2570cbe740 100644
--- a/usr.sbin/ypserv/ypserv/ypserv_db.c
+++ b/usr.sbin/ypserv/ypserv/ypserv_db.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ypserv_db.c,v 1.6 1996/06/27 20:25:54 deraadt Exp $ */
+/* $OpenBSD: ypserv_db.c,v 1.7 1996/09/29 08:11:04 dm Exp $ */
/*
* Copyright (c) 1994 Mats O Jansson <moj@stacken.kth.se>
@@ -34,7 +34,7 @@
*/
#ifndef LINT
-static char rcsid[] = "$OpenBSD: ypserv_db.c,v 1.6 1996/06/27 20:25:54 deraadt Exp $";
+static char rcsid[] = "$OpenBSD: ypserv_db.c,v 1.7 1996/09/29 08:11:04 dm Exp $";
#endif
/*
@@ -492,6 +492,7 @@ ypdb_get_record(domain, map, key, ypprivate)
return(res);
/* note: lookup_host needs null terminated string */
strncpy(keystr, key.keydat_val, key.keydat_len);
+ keystr[key.keydat_len] = '\0';
res.stat = lookup_host((hn == 0) ? TRUE : FALSE,
host_lookup, db, keystr, &res);
} else {