mirror of
https://github.com/jedisct1/libsodium.git
synced 2026-08-27 20:27:12 +09:00
Check for SecureZeroMemory at compile time.
This commit is contained in:
@@ -148,6 +148,10 @@ dnl Checks for typedefs, structures, and compiler characteristics.
|
||||
|
||||
AC_C_BIGENDIAN
|
||||
|
||||
dnl Checks for functions and headers
|
||||
|
||||
AC_CHECK_FUNCS([SecureZeroMemory])
|
||||
|
||||
dnl Switches.
|
||||
|
||||
AC_ARG_ENABLE(pie,
|
||||
|
||||
@@ -51,7 +51,7 @@ static Salsa20Random stream = {
|
||||
static void
|
||||
sodium_memzero(void * const pnt, const size_t size)
|
||||
{
|
||||
#ifdef _WIN32
|
||||
#ifdef HAVE_SECUREZEROMEMORY
|
||||
SecureZeroMemory(pnt, size);
|
||||
#else
|
||||
volatile unsigned char *pnt_ = (volatile unsigned char *) pnt;
|
||||
|
||||
Reference in New Issue
Block a user