[PATCH 2/6] ws2_32: Explicitly ignore the output buffer in FIONBIO.
Zebediah Figura
z.figura12 at gmail.com
Mon Jun 7 19:53:08 CDT 2021
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=51231
Signed-off-by: Zebediah Figura <z.figura12 at gmail.com>
---
dlls/ws2_32/socket.c | 4 +++-
dlls/ws2_32/tests/sock.c | 2 +-
2 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/dlls/ws2_32/socket.c b/dlls/ws2_32/socket.c
index a425905e5af..12698a37fd0 100644
--- a/dlls/ws2_32/socket.c
+++ b/dlls/ws2_32/socket.c
@@ -3368,8 +3368,10 @@ INT WINAPI WSAIoctl(SOCKET s, DWORD code, LPVOID in_buff, DWORD in_size, LPVOID
return -1;
}
+ /* Explicitly ignore the output buffer; WeChat tries to pass an address
+ * without write access. */
ret = server_ioctl_sock( s, IOCTL_AFD_WINE_FIONBIO, in_buff, in_size,
- out_buff, out_size, ret_size, overlapped, completion );
+ NULL, 0, ret_size, overlapped, completion );
SetLastError( ret );
return ret ? -1 : 0;
}
diff --git a/dlls/ws2_32/tests/sock.c b/dlls/ws2_32/tests/sock.c
index 26ad716dbe3..ddcc4313c8f 100644
--- a/dlls/ws2_32/tests/sock.c
+++ b/dlls/ws2_32/tests/sock.c
@@ -3934,7 +3934,7 @@ static void test_fionbio(void)
output = VirtualAlloc(NULL, 4, MEM_RESERVE | MEM_COMMIT, PAGE_NOACCESS);
ret = WSAIoctl(s, FIONBIO, &one, sizeof(one) + 1, output, 4, &size, NULL, NULL);
- todo_wine ok(!ret, "got error %u\n", WSAGetLastError());
+ ok(!ret, "got error %u\n", WSAGetLastError());
VirtualFree(output, 0, MEM_FREE);
overlapped.Internal = 0xdeadbeef;
--
2.32.0
More information about the wine-devel
mailing list