diff options
author | Mounir IDRASSI <mounir.idrassi@idrix.fr> | 2014-07-14 17:02:16 +0200 |
---|---|---|
committer | Mounir IDRASSI <mounir.idrassi@idrix.fr> | 2014-11-08 23:21:07 +0100 |
commit | f3625a080f084dfef7d3bc0fb495c5d7614d9341 (patch) | |
tree | 63b7ed93c7ebb79aef387aa684366788e7430d43 /src/Boot/Windows | |
parent | 3137d36d9a29ed55be5837abf1be3f959f831abc (diff) | |
download | VeraCrypt-f3625a080f084dfef7d3bc0fb495c5d7614d9341.tar.gz VeraCrypt-f3625a080f084dfef7d3bc0fb495c5d7614d9341.zip |
Static Code Analysis: Correctly initialize variables to avoid false-positive detection in the boot code.
Diffstat (limited to 'src/Boot/Windows')
-rw-r--r-- | src/Boot/Windows/BootEncryptedIo.cpp | 2 | ||||
-rw-r--r-- | src/Boot/Windows/BootMain.cpp | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/src/Boot/Windows/BootEncryptedIo.cpp b/src/Boot/Windows/BootEncryptedIo.cpp index ff048991..2e6d06d7 100644 --- a/src/Boot/Windows/BootEncryptedIo.cpp +++ b/src/Boot/Windows/BootEncryptedIo.cpp @@ -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 result;
+ BiosResult result = BiosResultSuccess;
AcquireSectorBuffer();
uint64 dataUnitNo;
uint64 writeOffset;
diff --git a/src/Boot/Windows/BootMain.cpp b/src/Boot/Windows/BootMain.cpp index 6df82bda..9f6d0d2d 100644 --- a/src/Boot/Windows/BootMain.cpp +++ b/src/Boot/Windows/BootMain.cpp @@ -584,7 +584,7 @@ static bool CopySystemPartitionToHiddenVolume (byte drive, byte &exitKey) sectorOffset.HighPart = 0;
int fragmentSectorCount = 0x7f; // Maximum safe value supported by BIOS
- int statCount;
+ int statCount = 0;
if (!CheckMemoryRequirements ())
goto err;
@@ -709,7 +709,7 @@ static void DecryptDrive (byte drive) uint64 sector = EncryptedVirtualPartition.EndSector + 1;
int fragmentSectorCount = 0x7f; // Maximum safe value supported by BIOS
- int statCount;
+ int statCount = 0;
bool skipBadSectors = false;
|