From b19811d5f4140281f99f4eea5e69d9d670f4d549 Mon Sep 17 00:00:00 2001 From: Douglas Huff Date: Sat, 7 Jul 2012 09:11:54 -0500 Subject: [PATCH] Fix OBO in socks5 auth proposal. This fixes compatibility with openssh's socks5 proxy and tor's .2.3.x branch. --- src/netbase.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/netbase.cpp b/src/netbase.cpp index aa767cd3..0a54fdf4 100644 --- a/src/netbase.cpp +++ b/src/netbase.cpp @@ -224,7 +224,7 @@ bool static Socks5(string strDest, int port, SOCKET& hSocket) } char pszSocks5Init[] = "\5\1\0"; char *pszSocks5 = pszSocks5Init; - ssize_t nSize = sizeof(pszSocks5Init); + ssize_t nSize = sizeof(pszSocks5Init) - 1; ssize_t ret = send(hSocket, pszSocks5, nSize, MSG_NOSIGNAL); if (ret != nSize)