|
|||||||||||
|
RE: safe strcpy()?
From: Michael Howard <mikehow(at)microsoft.com>
Date: Wed Jan 29 2003 - 16:06:41 EST
Then run tools over the code that model data flow through the app - just in case you missed something... A finally, have someone that understands this stuff review your code - just in case you missed something... Just a small data item: whenever I ask a bunch of developers whether you should accommodate for the trailing '\0' when determining the buffer size in a call to strncpy or strncat, 50% say YES, and 50% say NO... That means 50% are WRONG!! That's how buffer overruns occur... A stupid developer using 'safe' functions will produce stupid code!! There's no replacement for education, discpline and skill I'm afraid.
Cheers, Michael
-----Original Message-----
> Of course, the real way to build secure software is not to use "safe"
Hang on, that sounds akin to not having locks (safe functions) on your front door, but posting a guard (data validation) at the end of your drive way...hmmmmm I think I'll stick to my eXtreme Defensive Programming (XDP) and be paranoid about everything...unless you meant that by *adding* the data validity to the 'safe' functions to beef them up...? --phil Received on Wed Jan 29 16:27:49 2003 This archive was generated by hypermail 2.1.8 : Wed Aug 23 2006 - 14:02:46 EDT |
||||||||||
|
|||||||||||