Commit 75e511f3 authored by Jeff Zaroyko's avatar Jeff Zaroyko Committed by Alexandre Julliard

ws2_32: Test WSAAccept optional callback parameter before trying to use it.

parent 25a18037
......@@ -4386,6 +4386,8 @@ SOCKET WINAPI WSAAccept( SOCKET s, struct WS_sockaddr *addr, LPINT addrlen,
if (cs == SOCKET_ERROR) return SOCKET_ERROR;
if (!lpfnCondition) return cs;
CallerId.buf = (char *)&src_addr;
CallerId.len = sizeof(src_addr);
......@@ -4428,7 +4430,7 @@ SOCKET WINAPI WSAAccept( SOCKET s, struct WS_sockaddr *addr, LPINT addrlen,
FIXME("Unknown return type from Condition function\n");
SetLastError(WSAENOTSOCK);
return SOCKET_ERROR;
}
}
}
/***********************************************************************
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment