summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--usr.sbin/ppp/server.c4
-rw-r--r--usr.sbin/pppctl/pppctl.c4
2 files changed, 6 insertions, 2 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);
diff --git a/usr.sbin/pppctl/pppctl.c b/usr.sbin/pppctl/pppctl.c
index 15c591fc1dc..d374f3c7c6d 100644
--- a/usr.sbin/pppctl/pppctl.c
+++ b/usr.sbin/pppctl/pppctl.c
@@ -1,5 +1,5 @@
/*
- * $Id: pppctl.c,v 1.3 1997/12/18 00:30:44 brian Exp $
+ * $Id: pppctl.c,v 1.4 1997/12/21 02:26:56 brian Exp $
*/
#include <sys/types.h>
@@ -210,6 +210,7 @@ main(int argc, char **argv)
sock = (struct sockaddr *)&ifsun;
socksz = sizeof ifsun;
+ memset(&ifsun, '\0', sizeof ifsun);
ifsun.sun_len = strlen(argv[arg]);
if (ifsun.sun_len > sizeof ifsun.sun_path - 1) {
fprintf(stderr, "%s: Path too long\n", argv[arg]);
@@ -239,6 +240,7 @@ main(int argc, char **argv)
socksz = sizeof ifsin;
hlen = strlen(host);
+ memset(&ifsin, '\0', sizeof ifsin);
if (strspn(host, "0123456789.") == hlen) {
if (!inet_aton(host, &ifsin.sin_addr)) {
fprintf(stderr, "Cannot translate %s\n", host);