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
No known key found for this signature in database
GPG Key ID: DD0C382D5FCFB8FC
1 changed files with 2 additions and 0 deletions

View File

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