summaryrefslogtreecommitdiff
path: root/usr.sbin/ypserv/mkalias
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>1998-07-09 06:33:05 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>1998-07-09 06:33:05 +0000
commit76e8b5233d9a3692b096ab56fc7ee6dabc3b2105 (patch)
treeb67e62785a44b8808a1632d1599ccaf617d022b5 /usr.sbin/ypserv/mkalias
parentf65bed3e4e47f791b47ed885ed13c1f7ca957c18 (diff)
do not gethostname with len-1
Diffstat (limited to 'usr.sbin/ypserv/mkalias')
-rw-r--r--usr.sbin/ypserv/mkalias/mkalias.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.sbin/ypserv/mkalias/mkalias.c b/usr.sbin/ypserv/mkalias/mkalias.c
index e430db8c2cd..3ff9de4d1f9 100644
--- a/usr.sbin/ypserv/mkalias/mkalias.c
+++ b/usr.sbin/ypserv/mkalias/mkalias.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: mkalias.c,v 1.4 1998/03/12 08:22:28 deraadt Exp $ */
+/* $OpenBSD: mkalias.c,v 1.5 1998/07/09 06:33:04 deraadt Exp $ */
/*
* Copyright (c) 1997 Mats O Jansson <moj@stacken.kth.se>
@@ -32,7 +32,7 @@
*/
#ifndef LINT
-static char rcsid[] = "$OpenBSD: mkalias.c,v 1.4 1998/03/12 08:22:28 deraadt Exp $";
+static char rcsid[] = "$OpenBSD: mkalias.c,v 1.5 1998/07/09 06:33:04 deraadt Exp $";
#endif
#include <ctype.h>
@@ -340,7 +340,7 @@ fail:
}
if (new_db != NULL) {
- gethostname(myname, sizeof(myname) - 1);
+ gethostname(myname, sizeof(myname));
key.dptr = YP_MASTER_KEY;
key.dsize = strlen(YP_MASTER_KEY);
val.dptr = myname;