Scoping question in C

Taavi Burns jaaaarel-Re5JQEeQqe8AvxtiuMwx3w at public.gmane.org
Mon Jun 13 14:39:17 UTC 2005


On 6/12/05, Henry Spencer <henry-lqW1N6Cllo0sV2N9l4h3zg at public.gmane.org> wrote:
> C doesn't do array assignments, e.g. copying whole strings, with `='.
> For that, you have to call strcpy().

Note: NEVER use strcpy().  Use only strncpy(), and always provide a
correct length parameter, lest you summon a buffer overflow demon.  ;)

-- 
taa
/*eof*/
--
The Toronto Linux Users Group.      Meetings: http://tlug.ss.org
TLUG requests: Linux topics, No HTML, wrap text below 80 columns
How to UNSUBSCRIBE: http://tlug.ss.org/subscribe.shtml





More information about the Legacy mailing list