diff options
author | marius <marius@FreeBSD.org> | 2017-09-17 01:32:45 +0000 |
---|---|---|
committer | marius <marius@FreeBSD.org> | 2017-09-17 01:32:45 +0000 |
commit | 4805872e9747211201fabb547f0c9bf4872b65d5 (patch) | |
tree | 981d6ec8f8cc02fa2ee8dd2a8e4345f08b1f3c01 | |
parent | 759dfbc318e830445230739d439532b063efce94 (diff) | |
download | FreeBSD-src-4805872e9747211201fabb547f0c9bf4872b65d5.zip FreeBSD-src-4805872e9747211201fabb547f0c9bf4872b65d5.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.
-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 0981a44..87cb815 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; } |