From owner-svn-src-all@freebsd.org Mon Mar 6 15:44:21 2017 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 0E46ECFBEF7; Mon, 6 Mar 2017 15:44:21 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2610:1c1:1:6074::16:84]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "freefall.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id E1912154F; Mon, 6 Mar 2017 15:44:20 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: by freefall.freebsd.org (Postfix, from userid 1235) id 34BB21699; Mon, 6 Mar 2017 15:44:20 +0000 (UTC) Date: Mon, 6 Mar 2017 16:44:19 +0100 From: Baptiste Daroussin To: "Pedro F. Giffuni" Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r314778 - head/lib/libfetch Message-ID: <20170306154419.psguuxspco3hgw64@ivaldir.net> References: <201703061538.v26Fc33J022910@repo.freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="rtulrpcuyuuqcf2s" Content-Disposition: inline In-Reply-To: <201703061538.v26Fc33J022910@repo.freebsd.org> User-Agent: NeoMutt/20170225 (1.8.0) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 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: Mon, 06 Mar 2017 15:44:21 -0000 --rtulrpcuyuuqcf2s Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Mar 06, 2017 at 03:38:03PM +0000, Pedro F. Giffuni wrote: > Author: pfg > Date: Mon Mar 6 15:38:03 2017 > New Revision: 314778 > URL: https://svnweb.freebsd.org/changeset/base/314778 >=20 > Log: > libfetch: extra bounds checking through reallocarray(3). > =20 > Reviewed by: des > MFC after: 1 week >=20 > Modified: > head/lib/libfetch/common.c >=20 > Modified: head/lib/libfetch/common.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/lib/libfetch/common.c Mon Mar 6 15:37:34 2017 (r314777) > +++ head/lib/libfetch/common.c Mon Mar 6 15:38:03 2017 (r314778) > @@ -1306,7 +1306,7 @@ fetch_add_entry(struct url_ent **p, int=20 > } > =20 > if (*len >=3D *size - 1) { > - tmp =3D realloc(*p, (*size * 2 + 1) * sizeof(**p)); > + tmp =3D reallocarray(*p, *size * 2 + 1, sizeof(**p)); It reduces portability of libfetch (which pkg depends on) I can probably ad= d an implementation of reallocarry in pkg itself. Best regards, Bapt --rtulrpcuyuuqcf2s Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEEgOTj3suS2urGXVU3Y4mL3PG3PloFAli9g9MACgkQY4mL3PG3 PlpuSBAA5iAxiI3TVgOf/7KDRNmJ+sUFfeMw/dd2cqcicTRhHXLFI8hwl20xZjz+ agsMoDEUidFi2IiD1qKk1BsWrO84EB527QgTkNk11NOS65dbd40yPqAvEbsQ+nu5 vkOmXxXHTh3CAjH+ILxzJ61KrDj5NcEmcGownHS4UhUEosk6iQhagrddU2ib6YuU LPXim/Itp6SK5t1VGT1xTQRdOX+OMA2y/MujaH68JKpcXjlLn+/ATADMgo/2Or67 ZEtoNFdTE72E+FRcDxB3fOBkQ1R1mUtWGydFYnFRQsJ17aT2ZaNbAmoky4DGXpGZ tNI4nh/R2LUS8PLQVYU++ar3Z6MMwvmA6hDKa1tia/++zmIcLzuAZIon58PffU7R IhicYnGI0yp4QAen396cgsk/tYWrOuhDFQnYoipIr68lueT4fR/TZ77uGNNr0SJn rZBjbeX9B/Kl1ohZ5GrwdQfqRId0PeyI6SzNVekQevmKbghLyF/8n1qZJ3nPw3IK vCZ18EATyH6RCYv7S8SiHY76LCD63dWphfWoYTDJW2HVG0OYIOybK5Y0xZ9heRB/ PFzT0tU57EEikgilwm+tSm9P/R+vxTLVHrpylK+Tl8N+L6S6zkLKStWRJ4Qe9IO6 yWR6mO4oIDmxRXRmEeDxFc4q0Ollv7kIA3JCaPLaskUdPvFyqnw= =63qX -----END PGP SIGNATURE----- --rtulrpcuyuuqcf2s--