[PATCH 1/3] ws2_32: Use server-side async I/O in AcceptEx().
Alexandre Julliard
julliard at winehq.org
Mon Oct 19 04:34:44 CDT 2020
Zebediah Figura <z.figura12 at gmail.com> writes:
> + unix_len = sizeof(unix_addr);
> + win_addr = (struct WS_sockaddr *)(out_data + req->recv_len + sizeof(int));
> + if (getsockname( fd, &unix_addr.addr, &unix_len ) < 0 ||
> + (win_len = sockaddr_from_unix( &unix_addr, win_addr, req->local_len )) < 0)
> + {
> + set_win32_error( sock_get_error( errno ) );
> + free( out_data );
> + return;
> + }
> + *(int *)(out_data + req->recv_len) = win_len;
You need to make sure the lengths are properly aligned, or else use
memcpy() when storing ints or WS_sockaddr data into the buffer.
--
Alexandre Julliard
julliard at winehq.org
More information about the wine-devel
mailing list