VeraCrypt
aboutsummaryrefslogtreecommitdiff
path: root/src/Common/SecurityToken.h
diff options
context:
space:
mode:
authorMounir IDRASSI <mounir.idrassi@idrix.fr>2014-07-09 02:01:57 +0200
committerMounir IDRASSI <mounir.idrassi@idrix.fr>2014-11-08 23:20:29 +0100
commitf19cfb336150358214572a35ebe6c97c4975d6a0 (patch)
tree9e611ba28484965be19b102c203f36306f252eba /src/Common/SecurityToken.h
parent9bb962c8bbf5fffde8a884975d7108c6783ab876 (diff)
downloadVeraCrypt-f19cfb336150358214572a35ebe6c97c4975d6a0.tar.gz
VeraCrypt-f19cfb336150358214572a35ebe6c97c4975d6a0.zip
Static Code Analysis : Correctly initialize member variables in various constructors
Diffstat (limited to 'src/Common/SecurityToken.h')
-rw-r--r--src/Common/SecurityToken.h7
1 files changed, 4 insertions, 3 deletions
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;