
16 Jan
2008
16 Jan
'08
9:56 p.m.
This one gets my vote:
#define MAX_LEN 80 static char tftp_filename[MAX_LEN];
strncpy(tftp_filename, str, MAX_LEN); tftp_filename[MAX_LEN-1] = 0;
May be truncated, but never overruns.
- Jason McMullan Network Appliance, Inc.