[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH] fix accept(2) with NULL peer
From: |
Riku Voipio |
Subject: |
[Qemu-devel] [PATCH] fix accept(2) with NULL peer |
Date: |
Mon, 19 Jan 2009 17:30:27 +0200 |
User-agent: |
Mutt/1.5.11+cvs20060126 |
Based on scratchbox2 patch by Mika Westerberg
Signed-off-by: Riku Voipio <address@hidden>
---
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
- [Qemu-devel] [PATCH] fix accept(2) with NULL peer,
Riku Voipio <=