This may address bug 54074, but I'm not sure.
From: Zebediah Figura zfigura@codeweavers.com
--- dlls/ws2_32/socket.c | 6 ++++++ dlls/ws2_32/tests/sock.c | 4 ++-- 2 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/dlls/ws2_32/socket.c b/dlls/ws2_32/socket.c index e8a04e2e714..2a8fcf01ed8 100644 --- a/dlls/ws2_32/socket.c +++ b/dlls/ws2_32/socket.c @@ -4035,6 +4035,12 @@ int WINAPI WSARecv(SOCKET s, LPWSABUF lpBuffers, DWORD dwBufferCount, LPWSAOVERLAPPED lpOverlapped, LPWSAOVERLAPPED_COMPLETION_ROUTINE lpCompletionRoutine) { + if (!dwBufferCount) + { + SetLastError( WSAEINVAL ); + return -1; + } + return WS2_recv_base(s, lpBuffers, dwBufferCount, NumberOfBytesReceived, lpFlags, NULL, NULL, lpOverlapped, lpCompletionRoutine, NULL); } diff --git a/dlls/ws2_32/tests/sock.c b/dlls/ws2_32/tests/sock.c index d29e1c768dc..58dcf9e7f4e 100644 --- a/dlls/ws2_32/tests/sock.c +++ b/dlls/ws2_32/tests/sock.c @@ -12811,14 +12811,14 @@ static void test_empty_recv(void) WSASetLastError(0xdeadbeef); ret = WSARecv(client, NULL, 0, NULL, &flags, &overlapped, NULL); ok(ret == -1, "expected failure\n"); - todo_wine ok(WSAGetLastError() == WSAEINVAL, "got error %u\n", WSAGetLastError()); + ok(WSAGetLastError() == WSAEINVAL, "got error %u\n", WSAGetLastError());
wsabuf.buf = buffer; wsabuf.len = 0; WSASetLastError(0xdeadbeef); ret = WSARecv(client, &wsabuf, 0, NULL, &flags, &overlapped, NULL); ok(ret == -1, "expected failure\n"); - todo_wine ok(WSAGetLastError() == WSAEINVAL, "got error %u\n", WSAGetLastError()); + ok(WSAGetLastError() == WSAEINVAL, "got error %u\n", WSAGetLastError());
WSASetLastError(0xdeadbeef); ret = WSARecv(client, &wsabuf, 1, NULL, &flags, &overlapped, NULL);
Hi,
It looks like your patch introduced the new failures shown below. Please investigate and fix them before resubmitting your patch. If they are not new, fixing them anyway would help a lot. Otherwise please ask for the known failures list to be updated.
The tests also ran into some preexisting test failures. If you know how to fix them that would be helpful. See the TestBot job for the details:
The full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=129243
Your paranoid android.
=== debian11 (32 bit report) ===
dmusic: dmusic: Timeout