diff options
author | Mounir IDRASSI <mounir.idrassi@idrix.fr> | 2017-07-20 16:20:43 +0200 |
---|---|---|
committer | Mounir IDRASSI <mounir.idrassi@idrix.fr> | 2017-07-20 23:23:20 +0200 |
commit | ac7714294930d987e44663dfdf3875a2271ff456 (patch) | |
tree | 1121cd507ded35304d5a0e5cd7424258bfa872d8 /src | |
parent | 5a9409a3afc3a2883e8a6878f77ef3194f5d023f (diff) | |
download | VeraCrypt-ac7714294930d987e44663dfdf3875a2271ff456.tar.gz VeraCrypt-ac7714294930d987e44663dfdf3875a2271ff456.zip |
Windows driver: fix IOCTL_DISK_GET_DRIVE_LAYOUT and IOCTL_DISK_GET_DRIVE_LAYOUT_EX output by using setting PartitionCount to 4 instead of 1 since this field must always be a multiple of 4 for MBR disks.
Diffstat (limited to 'src')
-rw-r--r-- | src/Driver/Ntdriver.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/Driver/Ntdriver.c b/src/Driver/Ntdriver.c index 83cf7dee..5a2038ff 100644 --- a/src/Driver/Ntdriver.c +++ b/src/Driver/Ntdriver.c @@ -959,7 +959,7 @@ NTSTATUS ProcessVolumeDeviceControlIrp (PDEVICE_OBJECT DeviceObject, PEXTENSION PDRIVE_LAYOUT_INFORMATION outputBuffer = (PDRIVE_LAYOUT_INFORMATION) Irp->AssociatedIrp.SystemBuffer; - outputBuffer->PartitionCount = 1; + outputBuffer->PartitionCount = 4; outputBuffer->Signature = GetCrc32((unsigned char*) &(Extension->UniqueVolumeId), 4); outputBuffer->PartitionEntry->PartitionType = Extension->PartitionType; @@ -983,7 +983,7 @@ NTSTATUS ProcessVolumeDeviceControlIrp (PDEVICE_OBJECT DeviceObject, PEXTENSION PDRIVE_LAYOUT_INFORMATION_EX outputBuffer = (PDRIVE_LAYOUT_INFORMATION_EX) Irp->AssociatedIrp.SystemBuffer; - outputBuffer->PartitionCount = 1; + outputBuffer->PartitionCount = 4; outputBuffer->PartitionStyle = PARTITION_STYLE_MBR; outputBuffer->Mbr.Signature = GetCrc32((unsigned char*) &(Extension->UniqueVolumeId), 4); |