From: Riku Voipio <riku.voipio@iki.fi>
To: qemu-devel@nongnu.org
Subject: [Qemu-devel] [PATCH] fix accept(2) with NULL peer
Date: Mon, 19 Jan 2009 17:30:27 +0200 [thread overview]
Message-ID: <20090119153027.GA21164@kos.to> (raw)
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
next reply other threads:[~2009-01-19 15:30 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-01-19 15:30 Riku Voipio [this message]
2009-01-30 19:49 ` [Qemu-devel] [PATCH] fix accept(2) with NULL peer Aurelien Jarno
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20090119153027.GA21164@kos.to \
--to=riku.voipio@iki.fi \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.