mirror of
https://github.com/veracrypt/VeraCrypt.git
synced 2025-11-12 03:18:26 -06:00
Linux/MacOSX: Implement Unicode passwords suppport. Make validation of parameters in GUI more robust.
This commit is contained in:
@@ -58,11 +58,15 @@ namespace VeraCrypt
|
||||
void Buffer::CopyFrom (const ConstBufferPtr &bufferPtr)
|
||||
{
|
||||
if (!IsAllocated ())
|
||||
Allocate (bufferPtr.Size());
|
||||
{
|
||||
if (bufferPtr.Size())
|
||||
Allocate (bufferPtr.Size());
|
||||
}
|
||||
else if (bufferPtr.Size() > DataSize)
|
||||
throw ParameterTooLarge (SRC_POS);
|
||||
|
||||
Memory::Copy (DataPtr, bufferPtr.Get(), bufferPtr.Size());
|
||||
if (bufferPtr.Size())
|
||||
Memory::Copy (DataPtr, bufferPtr.Get(), bufferPtr.Size());
|
||||
}
|
||||
|
||||
void Buffer::Erase ()
|
||||
|
||||
Reference in New Issue
Block a user