[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [tor/master] Bugfix: sizeof(socklen) doesn't make sense when calling connect()



commit 1ec54b3556ff24d3cfee72bebba48be90243fb2d
Author: rl1987 <rl1987@xxxxxxxxxxxxxxxx>
Date:   Mon Sep 10 21:50:30 2018 +0300

    Bugfix: sizeof(socklen) doesn't make sense when calling connect()
    
    Bugfix on 2f657a1416f2f81dd1be900269c4ae9bdb29f52d; bug not in
    any Tor release.
---
 src/tools/tor-resolve.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/tools/tor-resolve.c b/src/tools/tor-resolve.c
index d5b498783..95411d173 100644
--- a/src/tools/tor-resolve.c
+++ b/src/tools/tor-resolve.c
@@ -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;
   }



_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits