http://bugs.winehq.org/show_bug.cgi?id=25401
Summary: The Wine implementation of Winsock API (WSAStringToAddress) has a bug. Product: Wine Version: unspecified Platform: All OS/Version: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: winsock AssignedTo: wine-bugs@winehq.org ReportedBy: alfaar_alhazin@hotmail.com
According to MSDN description:
INT WSAStringToAddress( __in LPTSTR AddressString, __in INT AddressFamily, __in LPWSAPROTOCOL_INFO lpProtocolInfo, __out LPSOCKADDR lpAddress, __in_out LPINT lpAddressLength ); lpAddressLength Length of the Address buffer, in bytes. Returns the size of the resultant sockaddr structure. If the specified buffer is not large enough, the function fails with a specific error of WSAEFAULT and this parameter is updated with the required size in bytes.
when function call returns successfully, the parameter lpAddressLength should have already been updated to the correct size of the address (for example: 16 for IPv4 address, 28 for IPv6 address). During our tests, the Wine implementation doesn't update the parameter before its return. The parameter remains unchanged (the input value of the parameter is usually larger than 16, usually 128).
As reported at: http://www.bitspirit.cc/en/index.php?q=node/153 By BitSpirit Team