From ce011b8a2d6fb3fd44baaff404750f6f57059edb Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Fri, 22 Nov 2002 16:59:40 +0000 Subject: [PATCH] =?UTF-8?q?bug=20fix=20for=20the=20problem=20Juan=20Ignaci?= =?UTF-8?q?o=20Herv=E1s=20discovered=20today?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/url.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/url.c b/lib/url.c index c07c50861..f67ef7bcb 100644 --- a/lib/url.c +++ b/lib/url.c @@ -1610,6 +1610,9 @@ static CURLcode ConnectPlease(struct connectdata *conn, return result; } +/* + * ALERT! The 'dns' pointer being passed in here might be NULL at times. + */ static void verboseconnect(struct connectdata *conn, struct Curl_dns_entry *dns) { @@ -1643,7 +1646,7 @@ static void verboseconnect(struct connectdata *conn, } #else { - Curl_addrinfo *hostaddr=dns->addr; + Curl_addrinfo *hostaddr=dns?dns->addr:NULL; struct in_addr in; (void) memcpy(&in.s_addr, &conn->serv_addr.sin_addr, sizeof (in.s_addr)); infof(data, "Connected to %s (%s) port %d\n",