Author: pschweitzer
Date: Thu Nov 3 21:38:56 2016
New Revision: 73113
URL:
http://svn.reactos.org/svn/reactos?rev=73113&view=rev
Log:
[DISK]
Don't overflow when computing disk size.
Patch by Vort.
CORE-12261
Modified:
trunk/reactos/drivers/storage/class/disk/disk.c
Modified: trunk/reactos/drivers/storage/class/disk/disk.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/storage/class/disk…
==============================================================================
--- trunk/reactos/drivers/storage/class/disk/disk.c [iso-8859-1] (original)
+++ trunk/reactos/drivers/storage/class/disk/disk.c [iso-8859-1] Thu Nov 3 21:38:56 2016
@@ -4283,7 +4283,7 @@
DeviceExtension->DiskGeometry->Geometry.SectorsPerTrack = sectorsPerTrack;
DeviceExtension->DiskGeometry->Geometry.TracksPerCylinder = tracksPerCylinder;
DeviceExtension->DiskGeometry->Geometry.Cylinders.QuadPart =
(LONGLONG)cylinders;
- DeviceExtension->DiskGeometry->DiskSize.QuadPart = cylinders *
tracksPerCylinder * sectorsPerTrack *
+ DeviceExtension->DiskGeometry->DiskSize.QuadPart = (LONGLONG)cylinders *
tracksPerCylinder * sectorsPerTrack *
DeviceExtension->DiskGeometry->Geometry.BytesPerSector;
DebugPrint((3,