summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2000-01-22 20:20:29 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2000-01-22 20:20:29 +0000
commita9e755d6a11ddb61c8eb50d4307c9611f1951a53 (patch)
treef92a5daf0e533e2783eaeb81e10a873ce823f507
parent67cf59e8c080a56eea1ad998209de98351dd02de (diff)
getsockname() requires initialized tolen; andy@guildsoftware.com
-rw-r--r--usr.bin/ssh/packet.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.bin/ssh/packet.c b/usr.bin/ssh/packet.c
index 7f7f888c2e7..1768f4ac73c 100644
--- a/usr.bin/ssh/packet.c
+++ b/usr.bin/ssh/packet.c
@@ -15,7 +15,7 @@
*/
#include "includes.h"
-RCSID("$Id: packet.c,v 1.20 2000/01/20 15:15:18 markus Exp $");
+RCSID("$Id: packet.c,v 1.21 2000/01/22 20:20:28 deraadt Exp $");
#include "xmalloc.h"
#include "buffer.h"
@@ -136,7 +136,7 @@ int
packet_connection_is_ipv4()
{
struct sockaddr_storage to;
- socklen_t tolen;
+ socklen_t tolen = sizeof(to);
memset(&to, 0, sizeof(to));
if (getsockname(connection_out, (struct sockaddr *)&to, &tolen) < 0)