]> git.saurik.com Git - wxWidgets.git/commitdiff
initialize name length before calling getsockname()
authorVadim Zeitlin <vadim@wxwidgets.org>
Sat, 27 Dec 2008 00:19:37 +0000 (00:19 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Sat, 27 Dec 2008 00:19:37 +0000 (00:19 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@57576 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/common/socket.cpp

index 071b0d53964bb724857d12a0f40d3902c90ef055..b76cfe809a4c750dc45a083f68f0f24fb474e65e 100644 (file)
@@ -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();