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

This commit is contained in:
Jeff Zaroyko 2008-11-06 19:35:43 +11:00 committed by Alexandre Julliard
parent 25a1803720
commit 75e511f3a7
1 changed files with 3 additions and 1 deletions

View File

@ -4386,6 +4386,8 @@ SOCKET WINAPI WSAAccept( SOCKET s, struct WS_sockaddr *addr, LPINT addrlen,
if (cs == SOCKET_ERROR) return SOCKET_ERROR; if (cs == SOCKET_ERROR) return SOCKET_ERROR;
if (!lpfnCondition) return cs;
CallerId.buf = (char *)&src_addr; CallerId.buf = (char *)&src_addr;
CallerId.len = sizeof(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"); FIXME("Unknown return type from Condition function\n");
SetLastError(WSAENOTSOCK); SetLastError(WSAENOTSOCK);
return SOCKET_ERROR; return SOCKET_ERROR;
} }
} }
/*********************************************************************** /***********************************************************************