From owner-svn-src-all@freebsd.org Sun May 29 03:44:46 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3CB80B4F4B7; Sun, 29 May 2016 03:44:46 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) by mx1.freebsd.org (Postfix) with ESMTP id 0609E1390; Sun, 29 May 2016 03:44:46 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from mail.xzibition.com (localhost [IPv6:::1]) by freefall.freebsd.org (Postfix) with ESMTP id B82D21AE2; Sun, 29 May 2016 03:44:45 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from mail.xzibition.com (localhost [172.31.3.2]) by mail.xzibition.com (Postfix) with ESMTP id 629C81E7B3; Sun, 29 May 2016 03:44:45 +0000 (UTC) X-Virus-Scanned: amavisd-new at mail.xzibition.com Received: from mail.xzibition.com ([172.31.3.2]) by mail.xzibition.com (mail.xzibition.com [172.31.3.2]) (amavisd-new, port 10026) with LMTP id FT7zEPHQwlzj; Sun, 29 May 2016 03:44:42 +0000 (UTC) Subject: Re: svn commit: r300932 - head/usr.sbin/rpcbind DKIM-Filter: OpenDKIM Filter v2.9.2 mail.xzibition.com 410D91E7AE To: Garrett Cooper , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201605290342.u4T3gpUB045575@repo.freebsd.org> From: Bryan Drewery Openpgp: id=F9173CB2C3AAEA7A5C8A1F0935D771BB6E4697CF; url=http://www.shatow.net/bryan/bryan2.asc Organization: FreeBSD Message-ID: <7c4e662d-069c-114e-c9d1-320a6571bc89@FreeBSD.org> Date: Sat, 28 May 2016 20:44:46 -0700 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.1.0 MIME-Version: 1.0 In-Reply-To: <201605290342.u4T3gpUB045575@repo.freebsd.org> Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="BoeIgGDBPsdGG3jn6wrrDFnGUegbQF7tV" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 29 May 2016 03:44:46 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --BoeIgGDBPsdGG3jn6wrrDFnGUegbQF7tV Content-Type: multipart/mixed; boundary="RoNEPexakSpcJq7tDO4S52VWxpvbn5xmt" From: Bryan Drewery To: Garrett Cooper , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Message-ID: <7c4e662d-069c-114e-c9d1-320a6571bc89@FreeBSD.org> Subject: Re: svn commit: r300932 - head/usr.sbin/rpcbind References: <201605290342.u4T3gpUB045575@repo.freebsd.org> In-Reply-To: <201605290342.u4T3gpUB045575@repo.freebsd.org> --RoNEPexakSpcJq7tDO4S52VWxpvbn5xmt Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 5/28/2016 8:42 PM, Garrett Cooper wrote: > Author: ngie > Date: Sun May 29 03:42:50 2016 > New Revision: 300932 > URL: https://svnweb.freebsd.org/changeset/base/300932 >=20 > Log: > Catch malloc(3) errors and socket(2) errors > =20 > - malloc failing will result in a delayed segfault > - socket failing will result in delayed failures with setsockopt > =20 > Exit in the event that either of these high-level conditions are met.= > =20 > Reported by: Coverity > CID: 976288, 976321, 976858 > Sponsored by: EMC / Isilon Storage Division >=20 > Modified: > head/usr.sbin/rpcbind/util.c >=20 > Modified: head/usr.sbin/rpcbind/util.c > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- head/usr.sbin/rpcbind/util.c Sun May 29 02:59:03 2016 (r300931) > +++ head/usr.sbin/rpcbind/util.c Sun May 29 03:42:50 2016 (r300932) > @@ -336,6 +336,7 @@ network_init(void) > if (local_in4 =3D=3D NULL) { > if (debugging) > fprintf(stderr, "can't alloc local ip4 addr\n"); > + exit(1); > } > memcpy(local_in4, res->ai_addr, sizeof *local_in4); > } > @@ -351,6 +352,7 @@ network_init(void) > if (local_in6 =3D=3D NULL) { > if (debugging) > fprintf(stderr, "can't alloc local ip6 addr\n"); > + exit(1); Did something meaningful get printed before this on hitting this error, without debug? > } > memcpy(local_in6, res->ai_addr, sizeof *local_in6); > } > @@ -365,6 +367,11 @@ network_init(void) > inet_pton(AF_INET6, RPCB_MULTICAST_ADDR, &mreq6.ipv6mr_multiaddr); > =20 > s =3D socket(AF_INET6, SOCK_DGRAM, IPPROTO_UDP); > + if (s =3D=3D -1) { > + if (debugging) > + fprintf(stderr, "couldn't create ip6 socket"); > + exit(1); > + } > =20 > /* > * Loop through all interfaces. For each IPv6 multicast-capable >=20 --=20 Regards, Bryan Drewery --RoNEPexakSpcJq7tDO4S52VWxpvbn5xmt-- --BoeIgGDBPsdGG3jn6wrrDFnGUegbQF7tV Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQEcBAEBAgAGBQJXSmWuAAoJEDXXcbtuRpfPMb8H/1GO+38HfA/JQlZI9LfBS+DV /F/Taa+i7BxEFNBqV3m0ZSANuWou24fPW3n1pZDLoqhazZo6fqsRQojYCEMMAImz oucBnnAniZvQwnI66aYzAAUKJEroLzHb4VWa4atkMbMloEFzPW/bzn9nXzyEb7SA fftULWP+CrwNXi4eGI2YpAyzcpsbHACQCou3yBwO0mRFPeoclDlNwIwvdg+m0/xD Ci8HwpvkmTKhuLERRNNlIGK+VLqVZOIgwcFr+iudab7YqGDb5hgsa/DI/fi+ggVY KB1MG3sHn8OSeB7J+twW7cc3ej/xC5PIlcozEz/N8MuneD8ojFW/9pJXIR49IWI= =ZlrK -----END PGP SIGNATURE----- --BoeIgGDBPsdGG3jn6wrrDFnGUegbQF7tV--