[BOOTLIB] Fix 64 bit issues (#433)

This commit is contained in:
Timo Kreuzer 2018-03-18 16:10:41 +01:00 committed by GitHub
parent 8bbbab534a
commit 3be4081607
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
18 changed files with 85 additions and 58 deletions

View file

@ -567,7 +567,7 @@ MmHaInitialize (
PVOID
BlMmAllocateHeap (
_In_ ULONG Size
_In_ SIZE_T Size
)
{
ULONG BufferSize;
@ -581,8 +581,8 @@ BlMmAllocateHeap (
}
/* Align the buffer size to the minimum size required */
BufferSize = ALIGN_UP(Size + FIELD_OFFSET(BL_BUSY_HEAP_ENTRY, Buffer),
FIELD_OFFSET(BL_BUSY_HEAP_ENTRY, Buffer));
BufferSize = ALIGN_UP_BY(Size + FIELD_OFFSET(BL_BUSY_HEAP_ENTRY, Buffer),
FIELD_OFFSET(BL_BUSY_HEAP_ENTRY, Buffer));
/* Watch out for overflow */
if (BufferSize <= Size)