Bad function hunt

Andre Nathan andre at
Sat Aug 28 17:05:50 PDT 2004


The patches at [1] substitute a number of dangerous string functions
(strcpy, strcat, sprintf) for their safer alternatives, strlcpy, strlcat
and snprintf, for the following programs at src/sbin: atacontrol, atm,
badsect, camcontrol, ccdconfig, clri, comcontrol.

I have also substituted strncpy and strncat, since they are slow, often
used incorrectly and changing them keeps the code more uniform.

The string-to-number conversion functions (strtol, atoi and similars) have
been substituted by strtonum.

Best regards,


More information about the Submit mailing list