From 4a33b4c0408cd190bc1f3af0fb7fc1a2f65a8afe Mon Sep 17 00:00:00 2001 From: Aleksey Bragin Date: Thu, 16 Nov 2006 17:26:31 +0000 Subject: [PATCH] Use Uint32x32To64() function instead of ULONG * ULONG. Fixes partition length truncation. See issue #1871 for more details. svn path=/trunk/; revision=24769 --- reactos/ntoskrnl/fstub/disksup.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/reactos/ntoskrnl/fstub/disksup.c b/reactos/ntoskrnl/fstub/disksup.c index 187dace16e1..dca4fd29e78 100644 --- a/reactos/ntoskrnl/fstub/disksup.c +++ b/reactos/ntoskrnl/fstub/disksup.c @@ -1583,7 +1583,8 @@ IoReadPartitionTable(IN PDEVICE_OBJECT DeviceObject, /* Get the starting offset */ PartitionInfo->StartingOffset.QuadPart = StartOffset + - GET_STARTING_SECTOR(PartitionDescriptor) * SectorSize; + UInt32x32To64(GET_STARTING_SECTOR(PartitionDescriptor), + SectorSize); /* Calculate the number of hidden sectors */ PartitionInfo->HiddenSectors = (PartitionInfo-> @@ -1593,7 +1594,8 @@ IoReadPartitionTable(IN PDEVICE_OBJECT DeviceObject, /* Get the partition length */ PartitionInfo->PartitionLength.QuadPart = - GET_PARTITION_LENGTH(PartitionDescriptor) * SectorSize; + UInt32x32To64(GET_PARTITION_LENGTH(PartitionDescriptor), + SectorSize); /* FIXME: REACTOS HACK */ PartitionInfo->PartitionNumber = i + 1; @@ -1637,8 +1639,9 @@ IoReadPartitionTable(IN PDEVICE_OBJECT DeviceObject, { /* Get its offset */ Offset.QuadPart = VolumeOffset.QuadPart + - GET_STARTING_SECTOR(PartitionDescriptor) * - SectorSize; + UInt32x32To64( + GET_STARTING_SECTOR(PartitionDescriptor), + SectorSize); /* If this is a primary partition, this is the volume offset */ if (IsPrimary) VolumeOffset = Offset; -- 2.17.1