mirror of
https://github.com/veracrypt/VeraCrypt.git
synced 2026-05-17 18:11:30 +00:00
Linux/MacOSX: Erase sensitive memory explicitly instead of relying on the compiler not optimizing calls to method Memory::Erase
This commit is contained in:
@@ -10,7 +10,6 @@
|
||||
code distribution packages.
|
||||
*/
|
||||
|
||||
#include "Common/Tcdefs.h"
|
||||
#include "Memory.h"
|
||||
#include "Exception.h"
|
||||
#include <stdlib.h>
|
||||
@@ -62,11 +61,6 @@ namespace VeraCrypt
|
||||
memcpy (memoryDestination, memorySource, size);
|
||||
}
|
||||
|
||||
void Memory::Erase (void *memory, size_t size)
|
||||
{
|
||||
burn (memory, size);
|
||||
}
|
||||
|
||||
void Memory::Zero (void *memory, size_t size)
|
||||
{
|
||||
memset (memory, 0, size);
|
||||
|
||||
Reference in New Issue
Block a user