Signed-off-by: Zebediah Figura zfigura@codeweavers.com --- dlls/ntdll/unix/socket.c | 13 ++++++++----- dlls/ws2_32/socket.c | 10 +++++----- include/wine/afd.h | 11 ++++++----- 3 files changed, 19 insertions(+), 15 deletions(-)
diff --git a/dlls/ntdll/unix/socket.c b/dlls/ntdll/unix/socket.c index b988253c67a..25b1280ac85 100644 --- a/dlls/ntdll/unix/socket.c +++ b/dlls/ntdll/unix/socket.c @@ -1414,6 +1414,7 @@ NTSTATUS sock_ioctl( HANDLE handle, HANDLE event, PIO_APC_ROUTINE apc, void *apc case IOCTL_AFD_WINE_RECVMSG: { struct afd_recvmsg_params *params = in_buffer; + unsigned int *ws_flags = u64_to_user_ptr(params->ws_flags_ptr); int unix_flags = 0;
if ((status = server_get_unix_fd( handle, 0, &fd, &needs_close, NULL, NULL ))) @@ -1425,15 +1426,17 @@ NTSTATUS sock_ioctl( HANDLE handle, HANDLE event, PIO_APC_ROUTINE apc, void *apc break; }
- if (*params->ws_flags & WS_MSG_OOB) + if (*ws_flags & WS_MSG_OOB) unix_flags |= MSG_OOB; - if (*params->ws_flags & WS_MSG_PEEK) + if (*ws_flags & WS_MSG_PEEK) unix_flags |= MSG_PEEK; - if (*params->ws_flags & WS_MSG_WAITALL) + if (*ws_flags & WS_MSG_WAITALL) FIXME( "MSG_WAITALL is not supported\n" );
- status = sock_recv( handle, event, apc, apc_user, io, fd, params->buffers, params->count, params->control, - params->addr, params->addr_len, params->ws_flags, unix_flags, params->force_async ); + status = sock_recv( handle, event, apc, apc_user, io, fd, u64_to_user_ptr(params->buffers_ptr), + params->count, u64_to_user_ptr(params->control_ptr), + u64_to_user_ptr(params->addr_ptr), u64_to_user_ptr(params->addr_len_ptr), + ws_flags, unix_flags, params->force_async ); break; }
diff --git a/dlls/ws2_32/socket.c b/dlls/ws2_32/socket.c index 2db441bee3c..89aded92098 100644 --- a/dlls/ws2_32/socket.c +++ b/dlls/ws2_32/socket.c @@ -923,13 +923,13 @@ static int WS2_recv_base( SOCKET s, WSABUF *buffers, DWORD buffer_count, DWORD * apc = socket_apc; }
- params.control = control; - params.addr = addr; - params.addr_len = addr_len; - params.ws_flags = flags; + params.control_ptr = u64_from_user_ptr(control); + params.addr_ptr = u64_from_user_ptr(addr); + params.addr_len_ptr = u64_from_user_ptr(addr_len); + params.ws_flags_ptr = u64_from_user_ptr(flags); params.force_async = !!overlapped; params.count = buffer_count; - params.buffers = buffers; + params.buffers_ptr = u64_from_user_ptr(buffers);
status = NtDeviceIoControlFile( (HANDLE)s, event, apc, cvalue, piosb, IOCTL_AFD_WINE_RECVMSG, ¶ms, sizeof(params), NULL, 0 ); diff --git a/include/wine/afd.h b/include/wine/afd.h index 9d1af44f117..7db429c2b79 100644 --- a/include/wine/afd.h +++ b/include/wine/afd.h @@ -281,14 +281,15 @@ C_ASSERT( sizeof(struct afd_connect_params) == 8 );
struct afd_recvmsg_params { - WSABUF *control; - struct WS(sockaddr) *addr; - int *addr_len; - unsigned int *ws_flags; + ULONGLONG control_ptr; /* WSABUF */ + ULONGLONG addr_ptr; /* WS(sockaddr) */ + ULONGLONG addr_len_ptr; /* int */ + ULONGLONG ws_flags_ptr; /* unsigned int */ int force_async; unsigned int count; - WSABUF *buffers; + ULONGLONG buffers_ptr; /* WSABUF[] */ }; +C_ASSERT( sizeof(struct afd_recvmsg_params) == 48 );
struct afd_sendmsg_params {