Date: Sat, 28 May 2016 20:44:46 -0700 From: Bryan Drewery <bdrewery@FreeBSD.org> To: Garrett Cooper <ngie@FreeBSD.org>, src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r300932 - head/usr.sbin/rpcbind Message-ID: <7c4e662d-069c-114e-c9d1-320a6571bc89@FreeBSD.org> In-Reply-To: <201605290342.u4T3gpUB045575@repo.freebsd.org> References: <201605290342.u4T3gpUB045575@repo.freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --BoeIgGDBPsdGG3jn6wrrDFnGUegbQF7tV Content-Type: multipart/mixed; boundary="RoNEPexakSpcJq7tDO4S52VWxpvbn5xmt" From: Bryan Drewery <bdrewery@FreeBSD.org> To: Garrett Cooper <ngie@FreeBSD.org>, 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--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?7c4e662d-069c-114e-c9d1-320a6571bc89>