|
|||||||||||
|
Re: strncpy() and NULL termination
From: Marc Slemko <marcs(at)znep.com>
Date: Sun Feb 16 1997 - 21:24:19 EST
> > Excuse me for meddling. I would think that the return val from
If you do that then you need to set buf[len-1] = '\0' before the strncpy. So, anyone up for doing a standard routine for logging (syslog?) when a program aborts for this reason? No, you don't want to blindly do it everywhere but it could be useful in some places if done correctly. Received on Sun Feb 16 18:29:33 1997 This archive was generated by hypermail 2.1.8 : Wed Aug 23 2006 - 12:41:02 EDT |
||||||||||
|
|||||||||||