Win32: SecureZeroMemory may not be available

This commit is contained in:
Frank Denis 2022-10-20 14:41:59 +02:00
parent e84e43d048
commit 69821eba93

View File

@ -121,7 +121,7 @@ _sodium_dummy_symbol_to_prevent_memzero_lto(void *const pnt,
void
sodium_memzero(void * const pnt, const size_t len)
{
#ifdef _WIN32
#if defined(_WIN32) && !defined(__CRT_INLINE)
SecureZeroMemory(pnt, len);
#elif defined(HAVE_MEMSET_S)
if (len > 0U && memset_s(pnt, (rsize_t) len, 0, (rsize_t) len) != 0) {