[6206] in bugtraq

home help back first fref pref prev next nref lref last post

Re: strcpy versus strncpy

daemon@ATHENA.MIT.EDU (Dean Gaudet)
Tue Mar 3 00:10:31 1998

Date: 	Mon, 2 Mar 1998 17:38:38 -0800
Reply-To: Dean Gaudet <dgaudet-list-bugtraq@ARCTIC.ORG>
From: Dean Gaudet <dgaudet-list-bugtraq@ARCTIC.ORG>
X-To:         Morten Welinder <terra@DIKU.DK>
To: BUGTRAQ@NETSPACE.ORG
In-Reply-To:  <199803030031.BAA09114@tyr.diku.dk>

You forgot:

4. strncpy is required to zero-fill the entire destination, which can be
quite a performance pig if the destination is big and the strncpy is
executed frequently.

Dean

home help back first fref pref prev next nref lref last post