3 ms·
> C11 has memset_s Annex K, so unfortunately that isn't widely available and unlikely to ever be. Also, there is a performance hit for where it is available [
by woodman 11y ago
> C11 has memset_s
Annex K, so unfortunately that isn't widely available and unlikely to ever be. Also, there is a performance hit for where it is available [0].
[0] http://www.open-std.org/jtc1/sc22/wg14/www/docs/n1967.htm http://www.open-std.org/jtc1/sc22/wg14/www/docs/n1967.htm
- pjmlp 11y agoBesides making it optional for C11, from security point of view they don't improve anything in C. Programmers still need to track pointer and length parameters separately, leading to the usual set of memory corruption.