[6478] linux-user: fix accept(2) with NULL peer
Revision: 6478
http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=6478 Author: aurel32 Date: 2009-01-30 19:47:47 +0000 (Fri, 30 Jan 2009)
Log Message:
-----------
linux-user: fix accept(2) with NULL peer
Based on scratchbox2 patch by Mika Westerberg
Signed-off-by Riku Voipio <[email protected]>
Signed-off-by Aurelien Jarno <[email protected]>
Modified Paths:
--------------
trunk/linux-user/syscall.c
Modified: trunk/linux-user/syscall.c
===================================================================
linux-user/syscall.c +3 -0
@@ -1267,6 +1267,9 @@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 ;