summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorderaadt <deraadt@openbsd.org>2002-06-02 19:06:39 +0000
committerderaadt <deraadt@openbsd.org>2002-06-02 19:06:39 +0000
commit0085026ed629cac855f7092c446584d9ad0e696c (patch)
tree7a0c5001ffbbc45705bfba6a4e0a65639dc88e4a
parentSkeleton driver for the NetOctave NSP2000 (only supports RNG at the moment) (diff)
downloadwireguard-openbsd-0085026ed629cac855f7092c446584d9ad0e696c.tar.xz
wireguard-openbsd-0085026ed629cac855f7092c446584d9ad0e696c.zip
missing sockaddr inits; ok itojun
-rw-r--r--usr.bin/rsh/kcmd.c5
-rw-r--r--usr.bin/rusers/rusers.c6
-rw-r--r--usr.sbin/map-mbone/mapper.c1
-rw-r--r--usr.sbin/mrinfo/mrinfo.c1
-rw-r--r--usr.sbin/mrouted/snmp.c1
-rw-r--r--usr.sbin/mrouted/vif.c2
-rw-r--r--usr.sbin/mtrace/mtrace.c3
7 files changed, 14 insertions, 5 deletions
diff --git a/usr.bin/rsh/kcmd.c b/usr.bin/rsh/kcmd.c
index 69e510dd2aa..91468207f1b 100644
--- a/usr.bin/rsh/kcmd.c
+++ b/usr.bin/rsh/kcmd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: kcmd.c,v 1.1 2002/05/06 22:23:53 deraadt Exp $ */
+/* $OpenBSD: kcmd.c,v 1.2 2002/06/02 19:06:39 deraadt Exp $ */
/* $NetBSD: kcmd.c,v 1.2 1995/03/21 07:58:32 cgd Exp $ */
/*
@@ -39,7 +39,7 @@
static char Xsccsid[] = "derived from @(#)rcmd.c 5.17 (Berkeley) 6/27/88";
static char sccsid[] = "@(#)kcmd.c 8.2 (Berkeley) 8/19/93";
#else
-static char rcsid[] = "$OpenBSD: kcmd.c,v 1.1 2002/05/06 22:23:53 deraadt Exp $";
+static char rcsid[] = "$OpenBSD: kcmd.c,v 1.2 2002/06/02 19:06:39 deraadt Exp $";
#endif
#endif /* not lint */
@@ -304,6 +304,7 @@ getport(alport)
if (*alport < IPPORT_RESERVED)
*alport = START_PORT;
+ memset(&sin, 0, sizeof sin);
sin.sin_family = AF_INET;
sin.sin_addr.s_addr = INADDR_ANY;
s = socket(AF_INET, SOCK_STREAM, 0);
diff --git a/usr.bin/rusers/rusers.c b/usr.bin/rusers/rusers.c
index a94d5feaaa5..74ff422a8dd 100644
--- a/usr.bin/rusers/rusers.c
+++ b/usr.bin/rusers/rusers.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: rusers.c,v 1.19 2001/11/07 00:02:58 millert Exp $ */
+/* $OpenBSD: rusers.c,v 1.20 2002/06/02 19:06:39 deraadt Exp $ */
/*
* Copyright (c) 2001 Todd C. Miller <Todd.Miller@courtesan.com>
@@ -55,7 +55,7 @@
*/
#ifndef lint
-static const char rcsid[] = "$OpenBSD: rusers.c,v 1.19 2001/11/07 00:02:58 millert Exp $";
+static const char rcsid[] = "$OpenBSD: rusers.c,v 1.20 2002/06/02 19:06:39 deraadt Exp $";
#endif /* not lint */
#include <sys/param.h>
@@ -355,6 +355,8 @@ onehost(char *host)
struct timeval tv = { 25, 0 };
int error;
+ memset(&sin, 0, sizeof sin);
+
hp = gethostbyname(host);
if (hp == NULL)
errx(1, "unknown host \"%s\"", host);
diff --git a/usr.sbin/map-mbone/mapper.c b/usr.sbin/map-mbone/mapper.c
index 0f08a23f9dc..930284698c9 100644
--- a/usr.sbin/map-mbone/mapper.c
+++ b/usr.sbin/map-mbone/mapper.c
@@ -903,6 +903,7 @@ int main(argc, argv)
struct sockaddr_in addr;
int addrlen = sizeof(addr);
+ memset(&addr, 0, sizeof addr);
addr.sin_family = AF_INET;
#if (defined(BSD) && (BSD >= 199103))
addr.sin_len = sizeof addr;
diff --git a/usr.sbin/mrinfo/mrinfo.c b/usr.sbin/mrinfo/mrinfo.c
index b49f0a9eb44..a856522af37 100644
--- a/usr.sbin/mrinfo/mrinfo.c
+++ b/usr.sbin/mrinfo/mrinfo.c
@@ -401,6 +401,7 @@ main(argc, argv)
struct sockaddr_in addr;
int addrlen = sizeof(addr);
+ memset(&addr, 0, sizeof addr);
addr.sin_family = AF_INET;
#if (defined(BSD) && (BSD >= 199103))
addr.sin_len = sizeof addr;
diff --git a/usr.sbin/mrouted/snmp.c b/usr.sbin/mrouted/snmp.c
index 6f203efc826..9dace7a71a1 100644
--- a/usr.sbin/mrouted/snmp.c
+++ b/usr.sbin/mrouted/snmp.c
@@ -90,6 +90,7 @@ snmp_init(dest_port)
perror("socket");
return 1;
}
+ memset(&me, 0, sizeof me);
me.sin_family = AF_INET;
me.sin_addr.s_addr = INADDR_ANY;
/* already in network byte order (I think) */
diff --git a/usr.sbin/mrouted/vif.c b/usr.sbin/mrouted/vif.c
index 71b46a989ec..9d7b657e27b 100644
--- a/usr.sbin/mrouted/vif.c
+++ b/usr.sbin/mrouted/vif.c
@@ -713,6 +713,7 @@ accept_neighbor_request(src, dst)
struct sockaddr_in addr;
int addrlen = sizeof(addr);
+ memset(&addr, 0, sizeof addr);
addr.sin_family = AF_INET;
#if (defined(BSD) && (BSD >= 199103))
addr.sin_len = sizeof addr;
@@ -800,6 +801,7 @@ accept_neighbor_request2(src, dst)
struct sockaddr_in addr;
int addrlen = sizeof(addr);
+ memset(&addr, 0, sizeof addr);
addr.sin_family = AF_INET;
#if (defined(BSD) && (BSD >= 199103))
addr.sin_len = sizeof addr;
diff --git a/usr.sbin/mtrace/mtrace.c b/usr.sbin/mtrace/mtrace.c
index a224fe4ea4e..7c040fecf57 100644
--- a/usr.sbin/mtrace/mtrace.c
+++ b/usr.sbin/mtrace/mtrace.c
@@ -52,7 +52,7 @@
#ifndef lint
static char rcsid[] =
- "@(#) $Id: mtrace.c,v 1.12 2002/02/19 19:39:40 millert Exp $";
+ "@(#) $Id: mtrace.c,v 1.13 2002/06/02 19:06:39 deraadt Exp $";
#endif
#include <netdb.h>
@@ -1311,6 +1311,7 @@ Usage: mtrace [-Mlnps] [-w wait] [-m max_hops] [-q nqueries] [-g gateway]\n\
/*
* Get default local address for multicasts to use in setting defaults.
*/
+ memset(&addr, 0, sizeof addr);
addr.sin_family = AF_INET;
#if (defined(BSD) && (BSD >= 199103))
addr.sin_len = sizeof(addr);