diff --git a/lib/roles/http/client/client-handshake.c b/lib/roles/http/client/client-handshake.c index 5f76749db..d891c6d6f 100644 --- a/lib/roles/http/client/client-handshake.c +++ b/lib/roles/http/client/client-handshake.c @@ -1372,7 +1372,7 @@ socks_generate_msg(struct lws *wsi, enum socks_msg_type type, ssize_t *msg_len) break; case SOCKS_MSG_CONNECT: - n = strlen(wsi->stash->address); + n = strlen(wsi->stash->cis[CIS_ADDRESS]); if (n > 254 || lws_ptr_diff(end, p) < 5 + n + 2) return 1; @@ -1391,7 +1391,7 @@ socks_generate_msg(struct lws *wsi, enum socks_msg_type type, ssize_t *msg_len) *p++ = n; /* the address we tell SOCKS proxy to connect to */ - memcpy(p, wsi->stash->address, n); + memcpy(p, wsi->stash->cis[CIS_ADDRESS], n); p += n; net_num = htons(wsi->c_port); diff --git a/lib/roles/http/client/client-http.c b/lib/roles/http/client/client-http.c index 4ead44cf6..15ea17170 100644 --- a/lib/roles/http/client/client-http.c +++ b/lib/roles/http/client/client-http.c @@ -80,6 +80,7 @@ lws_client_socket_service(struct lws *wsi, struct lws_pollfd *pollfd, int n = 0; #if defined(LWS_WITH_SOCKS5) int conn_mode = 0, pending_timeout = 0; + ssize_t len; #endif if ((pollfd->revents & LWS_POLLOUT) &&