Subject: Re: Performance of various memcpy()'s
To: None <tech-userlevel@netbsd.org, port-i386@netbsd.org>
From: Ignatios Souvatzis <is@netbsd.org>
List: tech-userlevel
Date: 10/28/2002 21:24:11
--NklN7DEeGtkPCoo3
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Hi,
On Mon, Oct 28, 2002 at 04:41:55PM +0900, Bang Jun-Young wrote:
> Along with this change, I'd like to get rid of _DIAGNOSTIC stuff as well.
> I don't understand why there's such a pointer wraparound check, since
> the memcpy(3) clearily says "use memmove() for overlap case."
Thats a different issue. There have been pointer wraparound attacks to
network daemons known to call memcpy(), a couple of months ago.
> It might
> be worth adding "if you're not sure, always use memmove()." comment
> to memcpy(3).
Strongly seconded.
Regards,
-is
--NklN7DEeGtkPCoo3
Content-Type: application/pgp-signature
Content-Disposition: inline
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (NetBSD)
Comment: For info see http://www.gnupg.org
iD8DBQE9vZzrPCRcZ/VMtk4RAsoOAJ0YtHLByWzjWPBUBd43QQs/C1tFkgCfTLnn
se5jaYGmC8dFUbiM1yFgEB8=
=duba
-----END PGP SIGNATURE-----
--NklN7DEeGtkPCoo3--