Bugfix: sizeof(socklen) doesn't make sense when calling connect()

Bugfix on 2f657a1416f2f81dd1be900269c4ae9bdb29f52d; bug not in
any Tor release.
This commit is contained in:
rl1987 2018-09-10 21:50:30 +03:00
parent b87a95289b
commit 1ec54b3556

View File

@ -224,7 +224,7 @@ do_resolve(const char *hostname,
socklen = tor_addr_to_sockaddr(sockshost, socksport,
(struct sockaddr *)&ss, sizeof(ss));
if (connect(s, (struct sockaddr*)&ss, sizeof(socklen))) {
if (connect(s, (struct sockaddr*)&ss, socklen)) {
log_sock_error("connecting to SOCKS host", s);
goto err;
}