VeraCrypt
aboutsummaryrefslogtreecommitdiff
path: root/src/Platform/Memory.h
diff options
context:
space:
mode:
authorMounir IDRASSI <mounir.idrassi@idrix.fr>2020-06-28 00:59:57 +0200
committerMounir IDRASSI <mounir.idrassi@idrix.fr>2020-06-28 01:06:39 +0200
commit885cc1d01d569b9a7b702aa81a2308c88a4e309c (patch)
treed9fbf25a97060ee6c96bdb7591feb6fc8eaec581 /src/Platform/Memory.h
parentfded83d25cf8f8b4bbd80a1250c4777063ddc221 (diff)
downloadVeraCrypt-885cc1d01d569b9a7b702aa81a2308c88a4e309c.tar.gz
VeraCrypt-885cc1d01d569b9a7b702aa81a2308c88a4e309c.zip
Linux/MacOSX: Erase sensitive memory explicitly instead of relying on the compiler not optimizing calls to method Memory::Erase
Diffstat (limited to 'src/Platform/Memory.h')
-rw-r--r--src/Platform/Memory.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/Platform/Memory.h b/src/Platform/Memory.h
index 2b022dfd..e0d4bfe3 100644
--- a/src/Platform/Memory.h
+++ b/src/Platform/Memory.h
@@ -16,6 +16,7 @@
#include <new>
#include <memory.h>
#include "PlatformBase.h"
+#include "Common/Tcdefs.h"
#ifdef TC_WINDOWS
@@ -76,7 +77,6 @@ namespace VeraCrypt
static void *AllocateAligned (size_t size, size_t alignment);
static int Compare (const void *memory1, size_t size1, const void *memory2, size_t size2);
static void Copy (void *memoryDestination, const void *memorySource, size_t size);
- static void Erase (void *memory, size_t size);
static void Free (void *memory);
static void FreeAligned (void *memory);
static void Zero (void *memory, size_t size);