by IvyMike · 12y ago · 0 comments
He's now at Goldman Sachs.
* http://www.openbsd.org/cgi-bin/cvsweb/src/lib/libc/string/st...
* http://www.openbsd.org/cgi-bin/cvsweb/src/lib/libc/string/st...
Here's VC++'s strcat_s:
errno_t strcat_s(
char *strDestination,
size_t numberOfElements,
const char *strSource
);
In VC++, numberOfElements is the size of strDestination. In the C11 spec, that parameter is the maximum number of bytes to copy into strDestination. People are going to search for strcat_s docs, find the MSDN page, and write buffer overflows.If strlcpy/strlcat aren't available on a target platform, I stick them them in a util.h/util.c, wrapped in #ifndefs. Like so: https://github.com/ggreer/the_silver_searcher/commit/a43dc87...
http://www.reddit.com/r/linux/comments/zzhd9/strfry_the_gnu_...
> He's now at Goldman Sachs.
A much better fit for both parties, from a cultural / personality perspective.