mirror of
https://github.com/veracrypt/VeraCrypt
synced 2024-11-30 23:13:31 +01:00
Windows Driver: correct value of number of cylinders by adding 1 since our virtual partition starts at Extension->BytesPerSector and not 0.
This commit is contained in:
parent
f50bf2cf61
commit
0e15c65b3e
@ -704,7 +704,8 @@ NTSTATUS TCOpenVolume (PDEVICE_OBJECT DeviceObject,
|
|||||||
Extension->TracksPerCylinder = 1;
|
Extension->TracksPerCylinder = 1;
|
||||||
Extension->SectorsPerTrack = 1;
|
Extension->SectorsPerTrack = 1;
|
||||||
Extension->BytesPerSector = Extension->cryptoInfo->SectorSize;
|
Extension->BytesPerSector = Extension->cryptoInfo->SectorSize;
|
||||||
Extension->NumberOfCylinders = Extension->DiskLength / Extension->BytesPerSector;
|
// Add extra sector since our virtual partition starts at Extension->BytesPerSector and not 0
|
||||||
|
Extension->NumberOfCylinders = (Extension->DiskLength / Extension->BytesPerSector) + 1;
|
||||||
Extension->PartitionType = 0;
|
Extension->PartitionType = 0;
|
||||||
|
|
||||||
Extension->bRawDevice = bRawDevice;
|
Extension->bRawDevice = bRawDevice;
|
||||||
|
Loading…
Reference in New Issue
Block a user