diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 1998-07-09 06:33:05 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 1998-07-09 06:33:05 +0000 |
commit | 76e8b5233d9a3692b096ab56fc7ee6dabc3b2105 (patch) | |
tree | b67e62785a44b8808a1632d1599ccaf617d022b5 /usr.sbin/ypserv/makedbm | |
parent | f65bed3e4e47f791b47ed885ed13c1f7ca957c18 (diff) |
do not gethostname with len-1
Diffstat (limited to 'usr.sbin/ypserv/makedbm')
-rw-r--r-- | usr.sbin/ypserv/makedbm/makedbm.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.sbin/ypserv/makedbm/makedbm.c b/usr.sbin/ypserv/makedbm/makedbm.c index 4085e7b9eb0..ca8c2009d4c 100644 --- a/usr.sbin/ypserv/makedbm/makedbm.c +++ b/usr.sbin/ypserv/makedbm/makedbm.c @@ -1,4 +1,4 @@ -/* $OpenBSD: makedbm.c,v 1.10 1998/03/12 08:22:27 deraadt Exp $ */ +/* $OpenBSD: makedbm.c,v 1.11 1998/07/09 06:33:03 deraadt Exp $ */ /* * Copyright (c) 1994-97 Mats O Jansson <moj@stacken.kth.se> @@ -32,7 +32,7 @@ */ #ifndef LINT -static char rcsid[] = "$OpenBSD: makedbm.c,v 1.10 1998/03/12 08:22:27 deraadt Exp $"; +static char rcsid[] = "$OpenBSD: makedbm.c,v 1.11 1998/07/09 06:33:03 deraadt Exp $"; #endif #include <stdio.h> @@ -303,7 +303,7 @@ fail: if (yp_master_name) { add_record(new_db, YP_MASTER_KEY, yp_master_name, FALSE); } else { - gethostname(myname, sizeof(myname) - 1); + gethostname(myname, sizeof(myname)); add_record(new_db, YP_MASTER_KEY, myname, FALSE); } |