aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/socks.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/socks.c b/lib/socks.c
index 6031096f9..98b7818d8 100644
--- a/lib/socks.c
+++ b/lib/socks.c
@@ -935,6 +935,13 @@ CURLcode Curl_SOCKS5(const char *proxy_user,
/* IPv6 */
len = 4 + 16 + 2;
}
+ else if(socksreq[3] == 1) {
+ len = 4 + 4 + 2;
+ }
+ else {
+ failf(data, "SOCKS5 reply has wrong address type.");
+ return CURLE_COULDNT_CONNECT;
+ }
/* At this point we already read first 10 bytes */
#if defined(HAVE_GSSAPI) || defined(USE_WINDOWS_SSPI)