asyn-ares: fix HTTPS-lookup when not on port 443

Follow-up to 8d0bfe74fb

Spotted by Codex Security

Closes #20966
This commit is contained in:
Daniel Stenberg 2026-03-17 23:53:33 +01:00
parent b11f43a4db
commit 02e04eaee7
No known key found for this signature in database
GPG key ID: 5CC908FDB71E12C2

View file

@ -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;
}