fix accept(2) with NULL peer
PATCH 1/1 fix accept(2) with NULL peer
Based on scratchbox2 patch by Mika Westerberg
Signed-off-by Riku Voipio <[email protected]>
--- linux-user/syscall.c | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-)
linux-user/syscall.c +3 -0
@@ -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 ;
Signature · 5 lines
1.5.6.5 -- "rm -rf" only sounds scary if you don't have backups
Aurelien Jarno
AppliedQuoted 3 lines · Riku Voipio
Based on scratchbox2 patch by Mika Westerberg
Signed-off-by Riku Voipio <[email protected]>
Thanks, applied.
Quoted 27 lines
--- linux-user/syscall.c | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-)linux-user/syscall.c +3
-0@@ -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 ;Signature · 5 lines
1.5.6.5 -- "rm -rf" only sounds scary if you don't have backups
Signature · 2 lines
Aurelien Jarno GPG: 1024D/F1BCDB73 [email protected] http://www.aurel32.net