On 3/5/07, Philip Taylor <[EMAIL PROTECTED]> wrote:
For the string functions which it does claim are unsafe (strcpy, strcat,
etc), it warns "This function or variable may be unsafe. Consider using
strcpy_s instead" and provides the _s alternatives; but strdup isn't one
of those functions. A call to strdup is actually compiled into a call to
_strdup (via linker tricks (I assume) in oldnames.lib), so there's no
difference at all in implementation or safety.

strdup isn't unsafe. it just copies a string--no worries about buffer overflow.

the ansi str* functions *are* likely unsafe, and should be converted
to something safe for compilers which offer a safe alternative, like
msvc. patches to redefine str* functions to the compiler-specific
variant are most certainly welcome.

~jerry

Reply via email to