updateconninfo: clear destination struct before getsockname()
Otherwise we may read uninitialized bytes later in the unix-domain sockets case.
This commit is contained in:
parent
7853c1cfe6
commit
9730c9fb70
@ -679,6 +679,7 @@ void Curl_updateconninfo(struct connectdata *conn, curl_socket_t sockfd)
|
||||
}
|
||||
|
||||
len = sizeof(struct Curl_sockaddr_storage);
|
||||
memset(&ssloc, 0, sizeof(ssloc));
|
||||
if(getsockname(sockfd, (struct sockaddr*) &ssloc, &len)) {
|
||||
error = SOCKERRNO;
|
||||
failf(data, "getsockname() failed with errno %d: %s",
|
||||
|
Loading…
Reference in New Issue
Block a user