1
0
mirror of https://github.com/veracrypt/VeraCrypt.git synced 2025-11-11 11:08:02 -06:00

Windows: various fixes following Coverity analysis.

This commit is contained in:
Mounir IDRASSI
2017-06-11 17:26:42 +02:00
parent 70d083bfb2
commit ce2aa639f4
6 changed files with 184 additions and 109 deletions

View File

@@ -2137,6 +2137,7 @@ namespace VeraCrypt
ZeroMemory (&sdn, sizeof (sdn));
ZeroMemory (&partInfo, sizeof (partInfo));
m_bMounted = false;
bBootVolumePathSelected = false;
}
void EfiBoot::SelectBootVolumeESP() {
@@ -2161,14 +2162,14 @@ namespace VeraCrypt
PUNICODE_STRING pStr = (PUNICODE_STRING) tempBuf;
memcpy (BootVolumePath, pStr->Buffer, min (pStr->Length, (sizeof (BootVolumePath) - 2)));
bBootVolumePathSelected = TRUE;
bBootVolumePathSelected = true;
}
void EfiBoot::SelectBootVolume(WCHAR* bootVolumePath) {
wstring str;
str = bootVolumePath;
memcpy (BootVolumePath, &str[0], min (str.length() * 2, (sizeof (BootVolumePath) - 2)));
bBootVolumePathSelected = TRUE;
bBootVolumePathSelected = true;
}
void EfiBoot::MountBootPartition(WCHAR letter) {