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.8.2~20 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=8eb2a2325957d2986593970dbaba2215b2940c9f;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 e294936ca..ec03d8bbf 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);