diff options
author | brian <brian@cvs.openbsd.org> | 1997-12-21 02:26:57 +0000 |
---|---|---|
committer | brian <brian@cvs.openbsd.org> | 1997-12-21 02:26:57 +0000 |
commit | ef6b2fdc3e2b6c6f9e241238b13c693af86b670d (patch) | |
tree | ed5a23e2079c6c07fa57b5fa5da620f4f3b85453 /usr.sbin/ppp/server.c | |
parent | f48de97edd8ff2784f80e8e4f9c741a41466179d (diff) |
Zero struct sockaddr_??s before filling them in.
Suggested by: Theo de Raadt <deraadt@cvs.openbsd.org>
Diffstat (limited to 'usr.sbin/ppp/server.c')
-rw-r--r-- | usr.sbin/ppp/server.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/usr.sbin/ppp/server.c b/usr.sbin/ppp/server.c index d66f0463990..ab03a817110 100644 --- a/usr.sbin/ppp/server.c +++ b/usr.sbin/ppp/server.c @@ -1,5 +1,5 @@ /* - * $Id: server.c,v 1.2 1997/12/06 12:09:04 brian Exp $ + * $Id: server.c,v 1.3 1997/12/21 02:26:55 brian Exp $ */ #include <sys/param.h> @@ -46,6 +46,7 @@ ServerLocalOpen(const char *name, mode_t mask) return 1; } + memset(&ifsun, '\0', sizeof ifsun); ifsun.sun_len = strlen(name); if (ifsun.sun_len > sizeof ifsun.sun_path - 1) { LogPrintf(LogERROR, "Local: %s: Path too long\n", name); @@ -108,6 +109,7 @@ ServerTcpOpen(int port) LogPrintf(LogERROR, "Tcp: socket: %s\n", strerror(errno)); return 7; } + memset(&ifsin, '\0', sizeof ifsin); ifsin.sin_family = AF_INET; ifsin.sin_addr.s_addr = INADDR_ANY; ifsin.sin_port = htons(port); |