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.
This commit is contained in:
Marius Strobl 2017-09-17 01:32:45 +00:00
parent 43616ffe4d
commit 3822029869
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/stable/10/; revision=323660

View File

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