Use memset_s() only if compiling in C11 mode.
This commit is contained in:
parent
cf8961a5bb
commit
290632a193
@ -24,7 +24,7 @@ sodium_memzero(void * const pnt, const size_t len)
|
||||
{
|
||||
#ifdef HAVE_SECUREZEROMEMORY
|
||||
SecureZeroMemory(pnt, len);
|
||||
#elif defined(HAVE_MEMSET_S)
|
||||
#elif defined(HAVE_MEMSET_S) && defined(__STDC_VERSION__) && __STDC_VERSION__ >= 201000L
|
||||
if (memset_s(pnt, (rsize_t) len, 0, (rsize_t) len) != 0) {
|
||||
abort();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user