qemu-trivial
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-trivial] [Qemu-devel] [PATCH for-1.1] libqtest: Fix socket_acc


From: Andreas Färber
Subject: Re: [Qemu-trivial] [Qemu-devel] [PATCH for-1.1] libqtest: Fix socket_accept() to pass address_len
Date: Mon, 11 Jun 2012 14:22:31 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:12.0) Gecko/20120421 Thunderbird/12.0

Am 28.05.2012 00:53, schrieb Andreas Färber:
> accept() expects address_len to point to the length of the sockaddr on
> input. Initialize it accordingly.
> 
> Resolves an assertion due to EFAULT on illumos.
> 
> Signed-off-by: Andreas Färber <address@hidden>

Ping? Verifiable by looking at the Linux man page.

/-F

> ---
>  tests/libqtest.c |    1 +
>  1 files changed, 1 insertions(+), 0 deletions(-)
> 
> diff --git a/tests/libqtest.c b/tests/libqtest.c
> index 6d333ef..1d73fd1 100644
> --- a/tests/libqtest.c
> +++ b/tests/libqtest.c
> @@ -74,6 +74,7 @@ static int socket_accept(int sock)
>      socklen_t addrlen;
>      int ret;
>  
> +    addrlen = sizeof(addr);
>      do {
>          ret = accept(sock, (struct sockaddr *)&addr, &addrlen);
>      } while (ret == -1 && errno == EINTR);




reply via email to

[Prev in Thread] Current Thread [Next in Thread]