3 ms·
No Sergey, Do not recommend RtlSecureZeroMemory(), but the secure C11 standard memset_s(). People will ignore bad advice, which would be a mistake, because thi
by rurban 9y ago
No Sergey,
Do not recommend RtlSecureZeroMemory(), but the secure C11 standard memset_s().
People will ignore bad advice, which would be a mistake, because this MySQL crypto
bug looks terrible.
See http://en.cppreference.com/w/c/string/byte/memset http://en.cppreference.com/w/c/string/byte/memset
memset_s is not optimized away.
This would be implemented on FreeBSD with explicit_bzero() or on Microsoft with SecureZeroMemory(), but there's a C11 standard for this.
You can use safeclib for this, when your libc doesn't have it. It doesn't because nobody cares yet about secure C functions. At least MSVC and Embarcadero does, and Android Bionic reportedly also.