[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-commits] [torsocks/master] Fix: add missing optlen assignement in connect
commit 70f79ab4350692f5f120ef216c507ab9f2a871de
Author: David Goulet <dgoulet@xxxxxxxxx>
Date: Mon Aug 5 11:58:46 2013 -0400
Fix: add missing optlen assignement in connect
Signed-off-by: David Goulet <dgoulet@xxxxxxxxx>
---
src/lib/connect.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/src/lib/connect.c b/src/lib/connect.c
index 6ab2a82..6d84cc8 100644
--- a/src/lib/connect.c
+++ b/src/lib/connect.c
@@ -38,6 +38,7 @@ LIBC_CONNECT_RET_TYPE tsocks_connect(LIBC_CONNECT_SIG)
DBG("Connect catched on fd %d", __sockfd);
+ optlen = sizeof(sock_type);
ret = getsockopt(__sockfd, SOL_SOCKET, SO_TYPE, &sock_type, &optlen);
if (ret < 0) {
/* Use the getsockopt() errno value. */
_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits