From e317d32fe1e9fb76ff9f47a256d075cc5332b845 Mon Sep 17 00:00:00 2001 From: Alexander Lunev Date: Thu, 10 Feb 2022 05:21:23 +0300 Subject: [PATCH] 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". --- netutils/netcat/netcat_main.c | 1 + 1 file changed, 1 insertion(+) diff --git a/netutils/netcat/netcat_main.c b/netutils/netcat/netcat_main.c index 1eade1243..fc1343c6b 100644 --- a/netutils/netcat/netcat_main.c +++ b/netutils/netcat/netcat_main.c @@ -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,