diff options
author | charnier <charnier@FreeBSD.org> | 1997-10-31 12:33:14 +0000 |
---|---|---|
committer | charnier <charnier@FreeBSD.org> | 1997-10-31 12:33:14 +0000 |
commit | f164448775c6362174ad4512e2afa6f31506ac29 (patch) | |
tree | 615f82582cda2bcca65de93b3f111b48d762d243 /usr.sbin | |
parent | d481f2e6ec9870b08ade1bd46a8b981c5df1ee52 (diff) | |
download | FreeBSD-src-f164448775c6362174ad4512e2afa6f31506ac29.zip FreeBSD-src-f164448775c6362174ad4512e2afa6f31506ac29.tar.gz |
Make all strings representing hostnames to be NUL-terminated within
MAXHOSTNAMELEN chars, like everywhere else in the system, so that strcpy()s
and printf()s won't fail.
Diffstat (limited to 'usr.sbin')
-rw-r--r-- | usr.sbin/timed/timed/globals.h | 2 | ||||
-rw-r--r-- | usr.sbin/timed/timed/slave.c | 4 | ||||
-rw-r--r-- | usr.sbin/timed/timed/timed.c | 4 | ||||
-rw-r--r-- | usr.sbin/timed/timedc/cmds.c | 4 |
4 files changed, 7 insertions, 7 deletions
diff --git a/usr.sbin/timed/timed/globals.h b/usr.sbin/timed/timed/globals.h index 9005a2a..852dd0c 100644 --- a/usr.sbin/timed/timed/globals.h +++ b/usr.sbin/timed/timed/globals.h @@ -119,7 +119,7 @@ struct hosttbl { struct hosttbl *l_fwd; struct netinfo *ntp; struct sockaddr_in addr; - char name[MAXHOSTNAMELEN+1]; + char name[MAXHOSTNAMELEN]; u_char head; /* 1=head of hash chain */ u_char good; /* 0=trusted host, for averaging */ u_char noanswer; /* count of failures to answer */ diff --git a/usr.sbin/timed/timed/slave.c b/usr.sbin/timed/timed/slave.c index 24c71ab..bab9bcd 100644 --- a/usr.sbin/timed/timed/slave.c +++ b/usr.sbin/timed/timed/slave.c @@ -36,7 +36,7 @@ static char sccsid[] = "@(#)slave.c 8.1 (Berkeley) 6/6/93"; #endif static const char rcsid[] = - "$Id: slave.c,v 1.3 1997/10/22 06:19:48 charnier Exp $"; + "$Id: slave.c,v 1.4 1997/10/29 07:32:29 charnier Exp $"; #endif /* not lint */ #include "globals.h" @@ -49,7 +49,7 @@ extern int justquit; extern u_short sequence; -static char master_name[MAXHOSTNAMELEN+1]; +static char master_name[MAXHOSTNAMELEN]; static struct netinfo *old_slavenet; static int old_status; diff --git a/usr.sbin/timed/timed/timed.c b/usr.sbin/timed/timed/timed.c index a3c11e3..ec0ca63 100644 --- a/usr.sbin/timed/timed/timed.c +++ b/usr.sbin/timed/timed/timed.c @@ -42,7 +42,7 @@ static const char copyright[] = static char sccsid[] = "@(#)timed.c 8.1 (Berkeley) 6/6/93"; #endif static const char rcsid[] = - "$Id: timed.c,v 1.5 1997/10/22 06:19:49 charnier Exp $"; + "$Id: timed.c,v 1.6 1997/10/29 07:32:30 charnier Exp $"; #endif /* not lint */ #define TSPTYPES @@ -92,7 +92,7 @@ static struct nets { struct hosttbl hosttbl[NHOSTS+1]; /* known hosts */ static struct goodhost { /* hosts that we trust */ - char name[MAXHOSTNAMELEN+1]; + char name[MAXHOSTNAMELEN]; struct goodhost *next; char perm; } *goodhosts; diff --git a/usr.sbin/timed/timedc/cmds.c b/usr.sbin/timed/timedc/cmds.c index e52afa4..2c97808 100644 --- a/usr.sbin/timed/timedc/cmds.c +++ b/usr.sbin/timed/timedc/cmds.c @@ -36,7 +36,7 @@ static char sccsid[] = "@(#)cmds.c 8.1 (Berkeley) 6/6/93"; #endif static const char rcsid[] = - "$Id: cmds.c,v 1.3 1997/10/22 06:20:04 charnier Exp $"; + "$Id: cmds.c,v 1.4 1997/10/29 07:35:27 charnier Exp $"; #endif /* not lint */ #include "timedc.h" @@ -68,7 +68,7 @@ static const char rcsid[] = int sock; int sock_raw; -char myname[MAXHOSTNAMELEN+1]; +char myname[MAXHOSTNAMELEN]; struct hostent *hp; struct sockaddr_in server; struct sockaddr_in dayaddr; |