mirror of
https://github.com/xemu-project/xemu.git
synced 2024-11-23 19:49:43 +00:00
linux-user: fix accept(2) with NULL peer
Based on scratchbox2 patch by Mika Westerberg Signed-off-by: Riku Voipio <riku.voipio@iki.fi> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6478 c046a42c-6fe2-441c-8c8c-71466251a162
This commit is contained in:
parent
08a2d4c4ff
commit
8fea36025b
@ -1267,6 +1267,9 @@ static abi_long do_getsockname(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;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user