Skip to content

Commit

Permalink
Fix Incorrect Variable Check in SeparateSpecialRegionsInMemoryMap() (t…
Browse files Browse the repository at this point in the history
…ianocore#143)

## Description

The variable used to check if we added entries to the memory map should
be MemoryMapEnd, not MapEntryEnd.

## Breaking change?
No

## How This Was Tested

Testing special regions

## Integration Instructions

N/A
  • Loading branch information
TaylorBeebe committed Nov 4, 2022
1 parent 4092b00 commit 8902257
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion MdeModulePkg/Core/Dxe/Misc/MemoryProtectionSupport.c
Original file line number Diff line number Diff line change
Expand Up @@ -2046,7 +2046,7 @@ SeparateSpecialRegionsInMemoryMap (
}

// if we've created new records, sort the map
if ((UINTN)MapEntryInsert > (UINTN)MapEntryEnd) {
if ((UINTN)MapEntryInsert > (UINTN)MemoryMapEnd) {
// Sort from low to high
SortMemoryMap (
MemoryMap,
Expand Down

0 comments on commit 8902257

Please sign in to comment.