From 7295546447af980adacb37553a276cb1c782ba23 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Tue, 21 Oct 2025 23:43:30 +0200 Subject: [PATCH] hostip: fix infof() output for non-ipv6 builds using IPv6 address Pointed out by ZeroPath Closes #19184 --- lib/hostip.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/hostip.c b/lib/hostip.c index 055ea78b48..d4b1b87e7a 100644 --- a/lib/hostip.c +++ b/lib/hostip.c @@ -1352,9 +1352,9 @@ CURLcode Curl_loadhostpairs(struct Curl_easy *data) } } #ifndef USE_IPV6 - if(memchr(target.str, ':', target.len)) { - infof(data, "Ignoring resolve address '%s', missing IPv6 support.", - address); + if(memchr(curlx_str(&target), ':', curlx_strlen(&target))) { + infof(data, "Ignoring resolve address '%.*s', missing IPv6 support.", + (int)curlx_strlen(&target), curlx_str(&target)); if(curlx_str_single(&host, ',')) goto err; continue;