DragonFly BSD
DragonFly submit List (threaded) for 2004-08
[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]

Bad function hunt


From: "Andre Nathan" <andre@xxxxxxxxxxxxxxx>
Date: Sat, 28 Aug 2004 21:05:18 -0300 (BRT)

Hello

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,
Andre

[1]http://andre.people.digirati.com.br/dragonfly/patches/hunt/



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