Author: pschweitzer
Date: Sun Apr 6 17:18:55 2014
New Revision: 62668
URL:
http://svn.reactos.org/svn/reactos?rev=62668&view=rev
Log:
[NTOSKRNL]
Fix overflow
CID #701303
Modified:
trunk/reactos/ntoskrnl/fstub/fstubex.c
Modified: trunk/reactos/ntoskrnl/fstub/fstubex.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/fstub/fstubex.c?r…
==============================================================================
--- trunk/reactos/ntoskrnl/fstub/fstubex.c [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/fstub/fstubex.c [iso-8859-1] Sun Apr 6 17:18:55 2014
@@ -2474,7 +2474,7 @@
NumberOfEntries = EfiHeader->NumberOfEntries;
RtlCopyMemory(&DiskGuid, &EfiHeader->DiskGUID,
sizeof(GUID));
/* Count number of sectors needed to store partitions */
- SectorsForPartitions = (NumberOfEntries * PARTITION_ENTRY_SIZE) /
Disk->SectorSize;
+ SectorsForPartitions = ((ULONGLONG)NumberOfEntries *
PARTITION_ENTRY_SIZE) / Disk->SectorSize;
/* Set first usable LBA: Legacy MBR + GPT header + Partitions entries
*/
FirstUsableLBA = SectorsForPartitions + 2;
/* Set last usable LBA: Last sector - GPT header - Partitions entries
*/