* Re: [Qemu-trivial] [Qemu-devel] [PATCH for-1.1] libqtest: Fix socket_accept() to pass address_len
[not found] <1338159200-7502-1-git-send-email-andreas.faerber@web.de>
@ 2012-06-11 12:22 ` Andreas Färber
0 siblings, 0 replies; only message in thread
From: Andreas Färber @ 2012-06-11 12:22 UTC (permalink / raw)
To: qemu-devel; +Cc: qemu-trivial, qemu-stable, anthony
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 <andreas.faerber@web.de>
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);
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2012-06-11 12:22 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <1338159200-7502-1-git-send-email-andreas.faerber@web.de>
2012-06-11 12:22 ` [Qemu-trivial] [Qemu-devel] [PATCH for-1.1] libqtest: Fix socket_accept() to pass address_len Andreas Färber
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).