4 ms·
It turns out there is a project - the safe C library - that implements strcpy_s and friends as an open source library (MIT license). so this header can be used
by MichaelMoser123 13y ago
It turns out there is a project - the safe C library - that implements strcpy_s and friends as an open source library (MIT license). so this header can be used with the Safe C library.
https://sourceforge.net/projects/safeclib/ https://sourceforge.net/projects/safeclib/
- MichaelMoser123 13y agoAlso interesting: with gcc you can add the -include poison.h command line option; now the poison.h header file is included as the first include of the source file. http://linux.die.net/man/1/gcc http://linux.die.net/man/1/gcc -include file Process file as if "#include "file"" appeared as the first line of the primary source file. However, the first directory searched for file is the preprocessor's working directory instead of the directory containing the main source file. If not found there, it is searched for in the remainder of the "#include "..."" search chain as normal. If multiple -include options are given, the files are included in the order they appear on the command line.