From f16ba4bb7ec67a12ce247d062ec14734c96aac75 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Sat, 27 Dec 2008 00:19:37 +0000 Subject: [PATCH] initialize name length before calling getsockname() git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@57576 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/common/socket.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/common/socket.cpp b/src/common/socket.cpp index 071b0d5396..b76cfe809a 100644 --- a/src/common/socket.cpp +++ b/src/common/socket.cpp @@ -255,7 +255,7 @@ void wxSocketImpl::PostCreation() wxSocketError wxSocketImpl::UpdateLocalAddress() { - WX_SOCKLEN_T lenAddr; + WX_SOCKLEN_T lenAddr = sizeof(*m_local->m_addr); if ( getsockname(m_fd, m_local->m_addr, &lenAddr) != 0 ) { Close(); -- 2.45.2