mirror of
https://github.com/veracrypt/VeraCrypt.git
synced 2025-11-11 19:08:26 -06:00
Windows: Replace XZip/XUnzip library with zlib and libzip and include the sources of these library into VeraCrypt source tree.
This commit is contained in:
@@ -82,6 +82,19 @@ namespace VeraCrypt
|
||||
~Buffer () { delete[] DataPtr; }
|
||||
byte *Ptr () const { return DataPtr; }
|
||||
size_t Size () const { return DataSize; }
|
||||
void Resize (size_t newSize)
|
||||
{
|
||||
if (newSize > DataSize)
|
||||
{
|
||||
byte *tmp = new byte[newSize];
|
||||
if (!tmp)
|
||||
throw bad_alloc();
|
||||
memcpy (tmp, DataPtr, DataSize);
|
||||
delete [] DataPtr;
|
||||
DataPtr = tmp;
|
||||
}
|
||||
DataSize = newSize;
|
||||
}
|
||||
|
||||
protected:
|
||||
byte *DataPtr;
|
||||
|
||||
Reference in New Issue
Block a user