diff --git a/src/Volume/VolumeInfo.h b/src/Volume/VolumeInfo.h index f9e07a2ee8..248439f490 100644 --- a/src/Volume/VolumeInfo.h +++ b/src/Volume/VolumeInfo.h @@ -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 &); diff --git a/src/Volume/VolumeLayout.h b/src/Volume/VolumeLayout.h index 40a8643d95..2e80801c9c 100644 --- a/src/Volume/VolumeLayout.h +++ b/src/Volume/VolumeLayout.h @@ -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 Header;