svn commit: r323659 - stable/11/lib/libfetch

Marius Strobl marius at FreeBSD.org
Sun Sep 17 01:32:40 UTC 2017


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


More information about the svn-src-all mailing list