[PATCH 1/1] ws2_32: Allow getsockname after AcceptEx

Zebediah Figura zfigura at codeweavers.com
Wed Jun 8 17:22:19 CDT 2022


Hello David, thanks for the patch!

On 6/6/22 16:53, David Curtiss wrote:
> diff --git a/server/sock.c b/server/sock.c
> index 77a88a7fcf7..db63c505770 100644
> --- a/server/sock.c
> +++ b/server/sock.c
> @@ -2716,7 +2716,7 @@ static void sock_ioctl( struct fd *fd, ioctl_code_t code, struct async *async )
>       }
>   
>       case IOCTL_AFD_GETSOCKNAME:
> -        if (!sock->bound)
> +        if (!sock->addr_len)
>           {
>               set_error( STATUS_INVALID_PARAMETER );
>               return;

I believe the correct thing to do is rather to make sure that 
sock->bound is set for sockets successfully used with AcceptEx(), i.e. 
in accept_into_socket().



More information about the wine-devel mailing list