Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/usr.sbin missing memset() for sockaddr. from deraadt
details: https://anonhg.NetBSD.org/src/rev/ca75a5947ab0
branches: trunk
changeset: 532197:ca75a5947ab0
user: itojun <itojun%NetBSD.org@localhost>
date: Sun Jun 02 13:47:02 2002 +0000
description:
missing memset() for sockaddr. from deraadt
diffstat:
usr.sbin/map-mbone/mapper.c | 3 ++-
usr.sbin/mrinfo/mrinfo.c | 5 +++--
usr.sbin/mrouted/snmp.c | 3 ++-
usr.sbin/mrouted/vif.c | 4 +++-
usr.sbin/mtrace/mtrace.c | 5 +++--
5 files changed, 13 insertions(+), 7 deletions(-)
diffs (111 lines):
diff -r 01d43f63307c -r ca75a5947ab0 usr.sbin/map-mbone/mapper.c
--- a/usr.sbin/map-mbone/mapper.c Sun Jun 02 11:21:53 2002 +0000
+++ b/usr.sbin/map-mbone/mapper.c Sun Jun 02 13:47:02 2002 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: mapper.c,v 1.8 2001/09/24 13:22:37 wiz Exp $ */
+/* $NetBSD: mapper.c,v 1.9 2002/06/02 13:47:02 itojun Exp $ */
/* Mapper for connections between MRouteD multicast routers.
* Written by Pavel Curtis <Pavel%PARC.Xerox.Com@localhost>
@@ -921,6 +921,7 @@
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 -r 01d43f63307c -r ca75a5947ab0 usr.sbin/mrinfo/mrinfo.c
--- a/usr.sbin/mrinfo/mrinfo.c Sun Jun 02 11:21:53 2002 +0000
+++ b/usr.sbin/mrinfo/mrinfo.c Sun Jun 02 13:47:02 2002 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: mrinfo.c,v 1.12 2001/09/24 13:22:37 wiz Exp $ */
+/* $NetBSD: mrinfo.c,v 1.13 2002/06/02 13:47:02 itojun Exp $ */
/*
* This tool requests configuration info from a multicast router
@@ -80,7 +80,7 @@
static char rcsid[] =
"@(#) Header: mrinfo.c,v 1.6 93/04/08 15:14:16 van Exp (LBL)";
#else
-__RCSID("$NetBSD: mrinfo.c,v 1.12 2001/09/24 13:22:37 wiz Exp $");
+__RCSID("$NetBSD: mrinfo.c,v 1.13 2002/06/02 13:47:02 itojun Exp $");
#endif
#endif
@@ -414,6 +414,7 @@
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 -r 01d43f63307c -r ca75a5947ab0 usr.sbin/mrouted/snmp.c
--- a/usr.sbin/mrouted/snmp.c Sun Jun 02 11:21:53 2002 +0000
+++ b/usr.sbin/mrouted/snmp.c Sun Jun 02 13:47:02 2002 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: snmp.c,v 1.4 1999/01/23 22:44:43 hwr Exp $ */
+/* $NetBSD: snmp.c,v 1.5 2002/06/02 13:47:03 itojun Exp $ */
#include "defs.h"
#include <netinet/in_var.h>
@@ -90,6 +90,7 @@
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 -r 01d43f63307c -r ca75a5947ab0 usr.sbin/mrouted/vif.c
--- a/usr.sbin/mrouted/vif.c Sun Jun 02 11:21:53 2002 +0000
+++ b/usr.sbin/mrouted/vif.c Sun Jun 02 13:47:02 2002 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: vif.c,v 1.8 2000/10/12 06:07:04 augustss Exp $ */
+/* $NetBSD: vif.c,v 1.9 2002/06/02 13:47:04 itojun Exp $ */
/*
* The mrouted program is covered by the license in the accompanying file
@@ -713,6 +713,7 @@
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 @@
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 -r 01d43f63307c -r ca75a5947ab0 usr.sbin/mtrace/mtrace.c
--- a/usr.sbin/mtrace/mtrace.c Sun Jun 02 11:21:53 2002 +0000
+++ b/usr.sbin/mtrace/mtrace.c Sun Jun 02 13:47:02 2002 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: mtrace.c,v 1.18 2001/09/24 13:22:37 wiz Exp $ */
+/* $NetBSD: mtrace.c,v 1.19 2002/06/02 13:47:04 itojun Exp $ */
/*
* mtrace.c
@@ -52,7 +52,7 @@
#include <sys/cdefs.h>
#ifndef lint
-__RCSID("$NetBSD: mtrace.c,v 1.18 2001/09/24 13:22:37 wiz Exp $");
+__RCSID("$NetBSD: mtrace.c,v 1.19 2002/06/02 13:47:04 itojun Exp $");
#endif
#include <sys/types.h>
@@ -1345,6 +1345,7 @@
/*
* 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);
Home |
Main Index |
Thread Index |
Old Index