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.
This commit is contained in:
parent
30d8a82fd9
commit
0b10309e4d
@ -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 */
|
||||
|
@ -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;
|
||||
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user