VeraCrypt
aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/Common/BootEncryption.cpp7
-rw-r--r--src/Common/BootEncryption.h2
-rw-r--r--src/Common/Exception.h4
-rw-r--r--src/Common/SecurityToken.h7
4 files changed, 14 insertions, 6 deletions
diff --git a/src/Common/BootEncryption.cpp b/src/Common/BootEncryption.cpp
index 29df5569..1a467eed 100644
--- a/src/Common/BootEncryption.cpp
+++ b/src/Common/BootEncryption.cpp
@@ -375,6 +375,13 @@ namespace VeraCrypt
SelectedEncryptionAlgorithmId (0),
VolumeHeaderValid (false)
{
+ HiddenOSCandidatePartition.IsGPT = FALSE;
+ HiddenOSCandidatePartition.Number = (size_t) -1;
+ DriveConfig.DriveNumber = -1;
+ DriveConfig.ExtraBootPartitionPresent = false;
+ DriveConfig.SystemLoaderPresent = false;
+ DriveConfig.InitialUnallocatedSpace = 0;
+ DriveConfig.TotalUnallocatedSpace = 0;
Elevator::AddReference();
}
diff --git a/src/Common/BootEncryption.h b/src/Common/BootEncryption.h
index 16e42e11..88830988 100644
--- a/src/Common/BootEncryption.h
+++ b/src/Common/BootEncryption.h
@@ -22,7 +22,7 @@ namespace VeraCrypt
class File
{
public:
- File () : FileOpen (false) { }
+ File () : Elevated (false), FileOpen (false), FilePointerPosition(0), Handle(NULL), IsDevice(false) { }
File (string path, bool readOnly = false, bool create = false);
~File () { Close(); }
diff --git a/src/Common/Exception.h b/src/Common/Exception.h
index 5bf9395f..e034404b 100644
--- a/src/Common/Exception.h
+++ b/src/Common/Exception.h
@@ -35,12 +35,12 @@ namespace VeraCrypt
struct ErrorException : public Exception
{
ErrorException (char *langId) : ErrLangId (langId) { }
- ErrorException (const wstring &errMsg) : ErrMsg (errMsg) { }
+ ErrorException (const wstring &errMsg) : ErrLangId(NULL), ErrMsg (errMsg) { }
void Show (HWND parent) const
{
if (ErrMsg.empty())
- ::Error (ErrLangId);
+ ::Error (ErrLangId? ErrLangId : "");
else
::ErrorDirect (ErrMsg.c_str());
}
diff --git a/src/Common/SecurityToken.h b/src/Common/SecurityToken.h
index c83ed328..8cad17c1 100644
--- a/src/Common/SecurityToken.h
+++ b/src/Common/SecurityToken.h
@@ -69,7 +69,7 @@ namespace VeraCrypt
struct SecurityTokenKeyfile
{
- SecurityTokenKeyfile () { }
+ SecurityTokenKeyfile () : Handle(CK_INVALID_HANDLE), SlotId(CK_UNAVAILABLE_INFORMATION) { Token.SlotId = CK_UNAVAILABLE_INFORMATION; Token.Flags = 0; }
SecurityTokenKeyfile (const SecurityTokenKeyfilePath &path);
operator SecurityTokenKeyfilePath () const;
@@ -85,7 +85,8 @@ namespace VeraCrypt
{
Pkcs11Exception (CK_RV errorCode = (CK_RV) -1)
: ErrorCode (errorCode),
- SubjectErrorCodeValid (false)
+ SubjectErrorCodeValid (false),
+ SubjectErrorCode( (uint64) -1)
{
}
@@ -155,7 +156,7 @@ namespace VeraCrypt
struct Pkcs11Session
{
- Pkcs11Session () : UserLoggedIn (false) { }
+ Pkcs11Session () : Handle (CK_UNAVAILABLE_INFORMATION), UserLoggedIn (false) { }
CK_SESSION_HANDLE Handle;
bool UserLoggedIn;