From a38afabf97a8f809f2c2e238cf5e94f7cc792438 Mon Sep 17 00:00:00 2001 From: marius 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. git-svn-id: svn://svn.freebsd.org/base/stable/10@323660 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f --- 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 0981a4451..87cb815d0 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; } -- 2.42.0