Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix uninitialized variables #966

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 16 additions & 16 deletions src/Volume/VolumeInfo.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,33 +35,33 @@ namespace VeraCrypt

// Modifying this structure can introduce incompatibility with previous versions
DirectoryPath AuxMountPoint;
uint32 EncryptionAlgorithmBlockSize;
uint32 EncryptionAlgorithmKeySize;
uint32 EncryptionAlgorithmMinBlockSize;
uint32 EncryptionAlgorithmBlockSize = 0;
uint32 EncryptionAlgorithmKeySize = 0;
uint32 EncryptionAlgorithmMinBlockSize = 0;
wstring EncryptionAlgorithmName;
wstring EncryptionModeName;
VolumeTime HeaderCreationTime;
bool HiddenVolumeProtectionTriggered;
bool HiddenVolumeProtectionTriggered = false;
DevicePath LoopDevice;
uint32 MinRequiredProgramVersion;
uint32 MinRequiredProgramVersion = 0;
DirectoryPath MountPoint;
VolumePath Path;
uint32 Pkcs5IterationCount;
uint32 Pkcs5IterationCount = 0;
wstring Pkcs5PrfName;
uint32 ProgramVersion;
uint32 ProgramVersion = 0;
VolumeProtection::Enum Protection;
uint64 SerialInstanceNumber;
uint64 Size;
uint64 SerialInstanceNumber = 0;
uint64 Size = 0;
VolumeSlotNumber SlotNumber;
bool SystemEncryption;
uint64 TopWriteOffset;
uint64 TotalDataRead;
uint64 TotalDataWritten;
VolumeType::Enum Type;
bool SystemEncryption = false;
uint64 TopWriteOffset = 0;
uint64 TotalDataRead = 0;
uint64 TotalDataWritten = 0;
VolumeType::Enum Type = VolumeType::Unknown;
DevicePath VirtualDevice;
VolumeTime VolumeCreationTime;
bool TrueCryptMode;
int Pim;
bool TrueCryptMode = false;
int Pim = 0;

private:
VolumeInfo (const VolumeInfo &);
Expand Down
8 changes: 4 additions & 4 deletions src/Volume/VolumeLayout.h
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,10 @@ namespace VeraCrypt
EncryptionAlgorithmList SupportedEncryptionAlgorithms;
EncryptionModeList SupportedEncryptionModes;

int BackupHeaderOffset;
int HeaderOffset;
uint32 HeaderSize;
VolumeType::Enum Type;
int BackupHeaderOffset = 0;
int HeaderOffset = 0;
uint32 HeaderSize = 0;
VolumeType::Enum Type = VolumeType::Unknown;

shared_ptr <VolumeHeader> Header;

Expand Down