> > Thus, replacing strcpy(3) calls with strncpy(3) can have definite > > impacts on performance. > > But the question is how big impact? Its a security/speed trade-off.
That depends on your actual code. It's not a security/speed trade-off, it's a _I_don't_fucking_care_about_anything_and_I_use_the_easiest_function/speed trade-off. If you care about security AND speed then you use strcpy() correctly, if you're a lazy bastard and don't care about speed, then use strncpy(). Anyway, usually you should fill the whole buffer, so if you know how to code, it shouldn't have a big impact. *BUT* if you're one of those lazy guys that just allocate a 1024 char buffer to copy 32 char strings then you have worse problems than security. > > Regards. -- Alejandro Barrera GarcĂa-Orea R&D Engineer c/ Alcala 268 28027 Madrid Office: +34 91 326 66 11 Fax: +34 91 326 66 11 e-mail: [EMAIL PROTECTED] _______________________________________________ Full-Disclosure - We believe in it. Charter: http://lists.grok.org.uk/full-disclosure-charter.html Hosted and sponsored by Secunia - http://secunia.com/
