From: Jérémie Galarneau Date: Wed, 31 Aug 2016 03:00:57 +0000 (-0400) Subject: Fix: pass a valid length to accept() on unix domain sockets X-Git-Tag: v2.9.0-rc1~51 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=50786a7245adff614aebe7a1ca42d51a88aaee8d;p=lttng-tools.git Fix: pass a valid length to accept() on unix domain sockets Signed-off-by: Jérémie Galarneau --- diff --git a/src/common/unix.c b/src/common/unix.c index 0e94bbc2b..7bcbb688b 100644 --- a/src/common/unix.c +++ b/src/common/unix.c @@ -82,7 +82,7 @@ int lttcomm_accept_unix_sock(int sock) { int new_fd; struct sockaddr_un s_un; - socklen_t len = 0; + socklen_t len = sizeof(s_un); /* Blocking call */ new_fd = accept(sock, (struct sockaddr *) &s_un, &len);