gabriel rosenkoetter on Fri, 14 Jun 2002 19:00:12 +0200


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Re: [PLUG] unix cp function call


On Fri, Jun 14, 2002 at 11:48:54AM -0400, Jeff Weisberg wrote:
> *never* use 'strcpy'(3)[1].
> use 'strncpy'(3).
> even in toy throw-away programs, it is cheap, safe,
> and good programming practice.

Erm, yes. That's actually a typo, but a really important one.

(Note that I never use str*(); I don't trust a given vendor's
implementation to do what I want, as they perform a vaguely heuristic
task where memcopy() performs a strictly defined one.)

-- 
gabriel rosenkoetter
gr@eclipsed.net

Attachment: pgpNIYhkgTMmv.pgp
Description: PGP signature