Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 25 Sep 2015 14:24:23 +0000 (UTC)
From:      Michael Gmelin <grembo@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r288217 - head/lib/libfetch
Message-ID:  <201509251424.t8PEONdo071309@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: grembo (ports committer)
Date: Fri Sep 25 14:24:23 2015
New Revision: 288217
URL: https://svnweb.freebsd.org/changeset/base/288217

Log:
  Fix non-POSIX-compliant use of getaddrinfo in libfetch
  
  Submitted by:	Boris Kolpackov <boris@codesynthesis.com>
  Reviewed by:	bapt
  Approved by:	bapt
  MFC after:	1 week
  Differential Revision:	https://reviews.freebsd.org/D3724

Modified:
  head/lib/libfetch/common.c

Modified: head/lib/libfetch/common.c
==============================================================================
--- head/lib/libfetch/common.c	Fri Sep 25 13:03:57 2015	(r288216)
+++ head/lib/libfetch/common.c	Fri Sep 25 14:24:23 2015	(r288217)
@@ -495,7 +495,8 @@ fetch_ssl_get_numeric_addrinfo(const cha
 	hints.ai_protocol = 0;
 	hints.ai_flags = AI_NUMERICHOST;
 	/* port is not relevant for this purpose */
-	getaddrinfo(host, "443", &hints, &res);
+	if (getaddrinfo(host, "443", &hints, &res) != 0)
+		res = NULL;
 	free(host);
 	return res;
 }



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