netutils/netcat: fixed crash on accept() invocation.
Sometimes netcat in server mode crashed with "psock_accept: ERROR: si_accept failed: -9". And sometimes it crashed with "up_assert: Assertion failed at file:inet/inet_sockif.c line: 841 task: netcat".
This commit is contained in:
parent
f4fdf94d53
commit
e317d32fe1
@ -174,6 +174,7 @@ int netcat_server(int argc, char * argv[])
|
||||
goto out;
|
||||
}
|
||||
|
||||
addrlen = sizeof(struct sockaddr_in);
|
||||
if ((conn = accept(id, (struct sockaddr *)&client, &addrlen)) != -1)
|
||||
{
|
||||
result = do_io(conn, outfd,
|
||||
|
Loading…
Reference in New Issue
Block a user