1
0
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:
Mounir IDRASSI
2016-09-15 10:04:05 +02:00
parent 66891638d5
commit 4dacedd9cc
154 changed files with 29709 additions and 8504 deletions

View File

@@ -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;