mirror of
https://github.com/veracrypt/VeraCrypt.git
synced 2025-11-11 11:08:02 -06:00
Static Code Analysis: Correctly initialize variables to avoid false-positive detection in the boot code.
This commit is contained in:
@@ -74,7 +74,7 @@ BiosResult ReadEncryptedSectors (uint16 destSegment, uint16 destOffset, byte dri
|
|||||||
|
|
||||||
BiosResult WriteEncryptedSectors (uint16 sourceSegment, uint16 sourceOffset, byte drive, uint64 sector, uint16 sectorCount)
|
BiosResult WriteEncryptedSectors (uint16 sourceSegment, uint16 sourceOffset, byte drive, uint64 sector, uint16 sectorCount)
|
||||||
{
|
{
|
||||||
BiosResult result;
|
BiosResult result = BiosResultSuccess;
|
||||||
AcquireSectorBuffer();
|
AcquireSectorBuffer();
|
||||||
uint64 dataUnitNo;
|
uint64 dataUnitNo;
|
||||||
uint64 writeOffset;
|
uint64 writeOffset;
|
||||||
|
|||||||
@@ -584,7 +584,7 @@ static bool CopySystemPartitionToHiddenVolume (byte drive, byte &exitKey)
|
|||||||
sectorOffset.HighPart = 0;
|
sectorOffset.HighPart = 0;
|
||||||
|
|
||||||
int fragmentSectorCount = 0x7f; // Maximum safe value supported by BIOS
|
int fragmentSectorCount = 0x7f; // Maximum safe value supported by BIOS
|
||||||
int statCount;
|
int statCount = 0;
|
||||||
|
|
||||||
if (!CheckMemoryRequirements ())
|
if (!CheckMemoryRequirements ())
|
||||||
goto err;
|
goto err;
|
||||||
@@ -709,7 +709,7 @@ static void DecryptDrive (byte drive)
|
|||||||
uint64 sector = EncryptedVirtualPartition.EndSector + 1;
|
uint64 sector = EncryptedVirtualPartition.EndSector + 1;
|
||||||
|
|
||||||
int fragmentSectorCount = 0x7f; // Maximum safe value supported by BIOS
|
int fragmentSectorCount = 0x7f; // Maximum safe value supported by BIOS
|
||||||
int statCount;
|
int statCount = 0;
|
||||||
|
|
||||||
bool skipBadSectors = false;
|
bool skipBadSectors = false;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user