Linux SOPC_Socket_Accept implementation issue
The linux implementation of SOPC_Socket_Accept
initializes
struct sockaddr remoteAddr;
socklen_t addrLen = 0;
(if (listeningSock != -1 && acceptedSock != NULL)
(...)
*acceptedSock = accept(listeningSock, &remoteAddr, &addrLen);
But POSIX reference states that, for accept
function:
The addrlen argument is a value-result argument: the caller must initialize it to contain the size (in bytes) of the structure pointed to by addr; on return it will contain the actual size of the peer address.
Edited by Jérémie Chabod