1
0
mirror of https://github.com/moparisthebest/curl synced 2024-11-16 06:25:03 -05:00

socks: check for DNS entries with the right port number

The resolve call is done with the right port number, but the subsequent
check used the wrong one, which then could find a previous resolve which
would return and leave the fresh resolve "incomplete" and leaking
memory.

Fixes #6247
Closes #6253
This commit is contained in:
Daniel Stenberg 2020-11-26 17:28:39 +01:00
parent d6ced230fe
commit 0b60d3685e
No known key found for this signature in database
GPG Key ID: 5CC908FDB71E12C2

View File

@ -771,7 +771,7 @@ CURLproxycode Curl_SOCKS5(const char *proxy_user,
case CONNECT_RESOLVING: case CONNECT_RESOLVING:
/* check if we have the name resolved by now */ /* check if we have the name resolved by now */
dns = Curl_fetch_addr(conn, hostname, (int)conn->port); dns = Curl_fetch_addr(conn, hostname, remote_port);
if(dns) { if(dns) {
#ifdef CURLRES_ASYNCH #ifdef CURLRES_ASYNCH