From d45317d8a4cec474786bf054e1182daac4da5964 Mon Sep 17 00:00:00 2001 From: damien Date: Sat, 22 Jan 2000 22:38:00 +0000 Subject: [PATCH] - OpenBSD CVS: - [packet.c] getsockname() requires initialized tolen; andy@guildsoftware.com --- CREDITS | 1 + ChangeLog | 5 +++++ packet.c | 2 +- 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/CREDITS b/CREDITS index ac992e30..03910b30 100644 --- a/CREDITS +++ b/CREDITS @@ -5,6 +5,7 @@ Theo de Raadt, and Dug Song - Creators of OpenSSH Andrew Stribblehill - Bugfixes Andre Lucas - build, login and many other fixes +Andy Sloane - bugfixes Ben Taylor - Solaris debugging and fixes Chip Salzenberg - Assorted patches Chris Saia - SuSE packaging diff --git a/ChangeLog b/ChangeLog index aec7a6d8..afc51024 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +20000123 + - OpenBSD CVS: + - [packet.c] + getsockname() requires initialized tolen; andy@guildsoftware.com + 20000122 - Fix compilation of bsd-snprintf.c on Solaris, fix from Ben Taylor diff --git a/packet.c b/packet.c index a8de0056..9be0ad1b 100644 --- a/packet.c +++ b/packet.c @@ -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) -- 2.45.2