Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 17 Sep 2017 01:32:38 +0000 (UTC)
From:      Marius Strobl <marius@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org
Subject:   svn commit: r323659 - stable/11/lib/libfetch
Message-ID:  <201709170132.v8H1WcN1071847@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: marius
Date: Sun Sep 17 01:32:38 2017
New Revision: 323659
URL: https://svnweb.freebsd.org/changeset/base/323659

Log:
  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.

Modified:
  stable/11/lib/libfetch/common.c
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/lib/libfetch/common.c
==============================================================================
--- stable/11/lib/libfetch/common.c	Sun Sep 17 01:08:42 2017	(r323658)
+++ stable/11/lib/libfetch/common.c	Sun Sep 17 01:32:38 2017	(r323659)
@@ -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;
 	}



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201709170132.v8H1WcN1071847>