On Tue, Oct 1, 2013 at 6:37 AM, Hans Leidekker hans@codeweavers.com wrote:
dlls/ws2_32/socket.c | 9 +-------- dlls/ws2_32/tests/sock.c | 6 +++--- 2 files changed, 4 insertions(+), 11 deletions(-)
diff --git a/dlls/ws2_32/socket.c b/dlls/ws2_32/socket.c index c34de4b..6855298 100644 --- a/dlls/ws2_32/socket.c +++ b/dlls/ws2_32/socket.c @@ -6546,12 +6546,8 @@ SOCKET WINAPI WSAAccept( SOCKET s, struct WS_sockaddr *addr, LPINT addrlen, TRACE("Socket %04lx, sockaddr %p, addrlen %p, fnCondition %p, dwCallbackData %ld\n", s, addr, addrlen, lpfnCondition, dwCallbackData);
size = sizeof(src_addr);
cs = WS_accept(s, &src_addr, &size);
cs = WS_accept(s, addr, addrlen);
The parameter addr may be NULL in WSAAccept, I can't check the source code right now but what will WS_accept do in this case?
Best wishes, Bruno
On Tue, 2013-10-01 at 09:32 -0300, Bruno Jesus wrote:
On Tue, Oct 1, 2013 at 6:37 AM, Hans Leidekker hans@codeweavers.com wrote:
dlls/ws2_32/socket.c | 9 +-------- dlls/ws2_32/tests/sock.c | 6 +++--- 2 files changed, 4 insertions(+), 11 deletions(-)
diff --git a/dlls/ws2_32/socket.c b/dlls/ws2_32/socket.c index c34de4b..6855298 100644 --- a/dlls/ws2_32/socket.c +++ b/dlls/ws2_32/socket.c @@ -6546,12 +6546,8 @@ SOCKET WINAPI WSAAccept( SOCKET s, struct WS_sockaddr *addr, LPINT addrlen, TRACE("Socket %04lx, sockaddr %p, addrlen %p, fnCondition %p, dwCallbackData %ld\n", s, addr, addrlen, lpfnCondition, dwCallbackData);
size = sizeof(src_addr);
cs = WS_accept(s, &src_addr, &size);
cs = WS_accept(s, addr, addrlen);
The parameter addr may be NULL in WSAAccept, I can't check the source code right now but what will WS_accept do in this case?
It will skip the WS_getpeername call. Good point, I'll add some tests for this case and resubmit the series.