diff --git a/fpmsyncd/fpmlink.cpp b/fpmsyncd/fpmlink.cpp index df59d0af85d4..2147f85d7dfe 100644 --- a/fpmsyncd/fpmlink.cpp +++ b/fpmsyncd/fpmlink.cpp @@ -71,7 +71,10 @@ FpmLink::~FpmLink() void FpmLink::accept() { struct sockaddr_in client_addr; - socklen_t client_len; + + // Ref: man 3 accept + // address_len argument, on input, specifies the length of the supplied sockaddr structure + socklen_t client_len = sizeof(struct sockaddr_in); m_connection_socket = ::accept(m_server_socket, (struct sockaddr *)&client_addr, &client_len);