From 69821eba937825f390c87ec5fecf6d4f897b492d Mon Sep 17 00:00:00 2001 From: Frank Denis Date: Thu, 20 Oct 2022 14:41:59 +0200 Subject: [PATCH] Win32: SecureZeroMemory may not be available --- src/libsodium/sodium/utils.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libsodium/sodium/utils.c b/src/libsodium/sodium/utils.c index 82005cbf..09cbc909 100644 --- a/src/libsodium/sodium/utils.c +++ b/src/libsodium/sodium/utils.c @@ -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) {