projects
/
qemu.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
fc8c5b8
)
libqtest: Fix socket_accept() to pass address_len
author
Andreas Färber
<andreas.faerber@web.de>
Sun, 27 May 2012 22:53:20 +0000
(
00:53
+0200)
committer
Stefan Hajnoczi
<stefanha@linux.vnet.ibm.com>
Fri, 22 Jun 2012 08:41:31 +0000
(09:41 +0100)
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>
Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
tests/libqtest.c
patch
|
blob
|
history
diff --git
a/tests/libqtest.c
b/tests/libqtest.c
index 6d333ef0ac278c40f7bb05165d8e83787f8cd43a..1d73fd19539689ed44a68d173c45400e5ffbbc91 100644
(file)
--- 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);