diff options
author | marius <marius@FreeBSD.org> | 2017-09-17 01:32:38 +0000 |
---|---|---|
committer | marius <marius@FreeBSD.org> | 2017-09-17 01:32:38 +0000 |
commit | 4afac37a9da7fb757f1d47bf1dc9105adbc7c0c1 (patch) | |
tree | ef910e4bb3b3237787a285db18613f4a0dedbccb /lib/libfetch/common.c | |
parent | e44297aa7c8b20f74352986ad5c27fed648542cc (diff) | |
download | FreeBSD-src-4afac37a9da7fb757f1d47bf1dc9105adbc7c0c1.zip FreeBSD-src-4afac37a9da7fb757f1d47bf1dc9105adbc7c0c1.tar.gz |
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.
Diffstat (limited to 'lib/libfetch/common.c')
-rw-r--r-- | lib/libfetch/common.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/libfetch/common.c b/lib/libfetch/common.c index 40fc2a7..7dc70b0 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; } |