Fix: pass a valid length to accept() on unix domain sockets
authorJérémie Galarneau <jeremie.galarneau@efficios.com>
Wed, 31 Aug 2016 03:00:57 +0000 (23:00 -0400)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Wed, 7 Sep 2016 21:31:58 +0000 (17:31 -0400)
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
src/common/unix.c

index e294936cade132a4771f9c65a8feb49cc5e26615..ec03d8bbfa4b5053355e1cf616aa5fb44ff182fc 100644 (file)
@@ -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);
This page took 0.027518 seconds and 4 git commands to generate.