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

Windows: zero TC_IOCTL_GET_SYSTEM_DRIVE_CONFIG input/output parameter as it is done for other IOCTLs

This commit is contained in:
Mounir IDRASSI
2018-10-08 21:40:40 +02:00
parent 0b8b50bde9
commit 4fea208958

View File

@@ -1526,6 +1526,7 @@ namespace VeraCrypt
bool BootEncryption::SystemDriveIsDynamic () bool BootEncryption::SystemDriveIsDynamic ()
{ {
GetSystemDriveConfigurationRequest request; GetSystemDriveConfigurationRequest request;
memset (&request, 0, sizeof (request));
StringCchCopyW (request.DevicePath, ARRAYSIZE (request.DevicePath), GetSystemDriveConfiguration().DeviceKernelPath.c_str()); StringCchCopyW (request.DevicePath, ARRAYSIZE (request.DevicePath), GetSystemDriveConfiguration().DeviceKernelPath.c_str());
CallDriver (TC_IOCTL_GET_SYSTEM_DRIVE_CONFIG, &request, sizeof (request), &request, sizeof (request)); CallDriver (TC_IOCTL_GET_SYSTEM_DRIVE_CONFIG, &request, sizeof (request), &request, sizeof (request));
@@ -1898,6 +1899,7 @@ namespace VeraCrypt
throw ParameterIncorrect (SRC_POS); throw ParameterIncorrect (SRC_POS);
GetSystemDriveConfigurationRequest request; GetSystemDriveConfigurationRequest request;
memset (&request, 0, sizeof (request));
StringCchCopyW (request.DevicePath, ARRAYSIZE (request.DevicePath), GetSystemDriveConfiguration().DeviceKernelPath.c_str()); StringCchCopyW (request.DevicePath, ARRAYSIZE (request.DevicePath), GetSystemDriveConfiguration().DeviceKernelPath.c_str());
CallDriver (TC_IOCTL_GET_SYSTEM_DRIVE_CONFIG, &request, sizeof (request), &request, sizeof (request)); CallDriver (TC_IOCTL_GET_SYSTEM_DRIVE_CONFIG, &request, sizeof (request), &request, sizeof (request));