diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2002-06-02 10:02:35 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2002-06-02 10:02:35 +0000 |
commit | caca1127209480f2e2a176837ff2f0498335730b (patch) | |
tree | 579eebb9b2b381549d3d4b620039e1f6425ccf20 /usr.sbin/dhcp | |
parent | 074012a7f3211bdccd328b85643ffc958b5e3587 (diff) |
clear sockaddr_in before use
Diffstat (limited to 'usr.sbin/dhcp')
-rw-r--r-- | usr.sbin/dhcp/common/icmp.c | 1 | ||||
-rw-r--r-- | usr.sbin/dhcp/common/socket.c | 1 |
2 files changed, 2 insertions, 0 deletions
diff --git a/usr.sbin/dhcp/common/icmp.c b/usr.sbin/dhcp/common/icmp.c index d64aef0ab44..c554e80c8d9 100644 --- a/usr.sbin/dhcp/common/icmp.c +++ b/usr.sbin/dhcp/common/icmp.c @@ -94,6 +94,7 @@ int icmp_echorequest (addr) if (!icmp_protocol_initialized) error ("attempt to use ICMP protocol before initialization."); + memset(&to, 0, sizeof to); to.sin_len = sizeof to; to.sin_family = AF_INET; to.sin_port = 0; /* unused. */ diff --git a/usr.sbin/dhcp/common/socket.c b/usr.sbin/dhcp/common/socket.c index a064e2f968b..01bb5dd1737 100644 --- a/usr.sbin/dhcp/common/socket.c +++ b/usr.sbin/dhcp/common/socket.c @@ -51,6 +51,7 @@ int if_register_socket (info) int flag; /* Set up the address we're going to bind to. */ + memset(&name, 0, sizeof name); name.sin_family = AF_INET; name.sin_port = local_port; name.sin_addr.s_addr = INADDR_ANY; |