qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] fix accept(2) with NULL peer
@ 2009-01-19 15:30 Riku Voipio
  2009-01-30 19:49 ` Aurelien Jarno
  0 siblings, 1 reply; 2+ messages in thread
From: Riku Voipio @ 2009-01-19 15:30 UTC (permalink / raw)
  To: qemu-devel

Based on scratchbox2 patch by Mika Westerberg

Signed-off-by: Riku Voipio <riku.voipio@iki.fi>
---
 linux-user/syscall.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/linux-user/syscall.c b/linux-user/syscall.c
index 53167e9..5e0b4ae 100644
--- a/linux-user/syscall.c
+++ b/linux-user/syscall.c
@@ -1281,6 +1281,9 @@ static abi_long do_accept(int fd, abi_ulong target_addr,
     void *addr;
     abi_long ret;
 
+    if (target_addr == 0)
+       return get_errno(accept(fd, NULL, NULL));
+
     if (get_user_u32(addrlen, target_addrlen_addr))
         return -TARGET_EFAULT;
 
-- 
1.5.6.5


-- 
"rm -rf" only sounds scary if you don't have backups

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2009-01-30 19:49 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-01-19 15:30 [Qemu-devel] [PATCH] fix accept(2) with NULL peer Riku Voipio
2009-01-30 19:49 ` Aurelien Jarno

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).