Zebediah Figura : ws2_32: Explicitly ignore the output buffer in FIONBIO.

Alexandre Julliard julliard at winehq.org
Tue Jun 8 16:34:26 CDT 2021


Module: wine
Branch: master
Commit: de89b98b37b2e258fabcd5bc3cf4d8431e42dc91
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=de89b98b37b2e258fabcd5bc3cf4d8431e42dc91

Author: Zebediah Figura <z.figura12 at gmail.com>
Date:   Mon Jun  7 19:53:08 2021 -0500

ws2_32: Explicitly ignore the output buffer in FIONBIO.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=51231
Signed-off-by: Zebediah Figura <z.figura12 at gmail.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 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;




More information about the wine-cvs mailing list