From 3822029869dfd1125b8f927d850953a71a21b9fa Mon Sep 17 00:00:00 2001 From: Marius Strobl Date: Sun, 17 Sep 2017 01:32:45 +0000 Subject: [PATCH] MFC: r322669 In fetch_resolve() if the port number or service name is included in the host argument (e. g. "www.freebsd.org:443"), correctly set the service pointer accordingly. Previously, the service pointer was set to the separator instead, causing getaddrinfo(3) to fail. --- lib/libfetch/common.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/libfetch/common.c b/lib/libfetch/common.c index 0981a44511f0..87cb815d024c 100644 --- a/lib/libfetch/common.c +++ b/lib/libfetch/common.c @@ -291,7 +291,7 @@ fetch_resolve(const char *addr, int port, int af) goto syserr; service = sbuf; } else if (*sep != '\0') { - service = sep; + service = sep + 1; } else { service = NULL; }