From 02e04eaee7cce029f88b2cf35885646c1b9c922b Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Tue, 17 Mar 2026 23:53:33 +0100 Subject: [PATCH] asyn-ares: fix HTTPS-lookup when not on port 443 Follow-up to 8d0bfe74fba1e8394e73d Spotted by Codex Security Closes #20966 --- lib/asyn-ares.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/asyn-ares.c b/lib/asyn-ares.c index 852cbdb702..91add7c697 100644 --- a/lib/asyn-ares.c +++ b/lib/asyn-ares.c @@ -728,7 +728,7 @@ CURLcode Curl_async_getaddrinfo(struct Curl_easy *data, const char *hostname, return CURLE_OUT_OF_MEMORY; #ifdef USE_HTTPSRR if(port != 443) { - rrname = curl_maprintf("_%d_.https.%s", port, hostname); + rrname = curl_maprintf("_%d._https.%s", port, hostname); if(!rrname) return CURLE_OUT_OF_MEMORY; }