gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[gnurl] 377/411: socks: check for DNS entries with the right port number


From: gnunet
Subject: [gnurl] 377/411: socks: check for DNS entries with the right port number
Date: Wed, 13 Jan 2021 01:23:12 +0100

This is an automated email from the git hooks/post-receive script.

nikita pushed a commit to branch master
in repository gnurl.

commit 0b60d3685e4705e2c0fe4ae9aa7cea4138fbce6d
Author: Daniel Stenberg <daniel@haxx.se>
AuthorDate: Thu Nov 26 17:28:39 2020 +0100

    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
---
 lib/socks.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/socks.c b/lib/socks.c
index d9f67ec57..a2d1e621f 100644
--- a/lib/socks.c
+++ b/lib/socks.c
@@ -771,7 +771,7 @@ CURLproxycode Curl_SOCKS5(const char *proxy_user,
 
   case CONNECT_RESOLVING:
     /* 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) {
 #ifdef CURLRES_ASYNCH

-- 
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]