mirror of
https://github.com/acidanthera/audk.git
synced 2025-04-08 17:05:09 +02:00
MdeModulePkg: Add ASSERT to make sure pointer 'MemoryMap' is not NULL.
If 'CoreGetMemoryMap' return success the 'MemoryMap' shouldn't be NULL. Add code to make sure this. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Qiu Shumin <shumin.qiu@intel.com> Reviewed-by: Yao Jiewen <Jiewen.Yao@intel.com>
This commit is contained in:
parent
ba33c80fc5
commit
4cb6375ca6
@ -790,6 +790,7 @@ CoreGetMemoryMapPropertiesTable (
|
||||
if (Status == EFI_BUFFER_TOO_SMALL) {
|
||||
*MemoryMapSize = *MemoryMapSize + (*DescriptorSize) * AdditionalRecordCount;
|
||||
} else if (Status == EFI_SUCCESS) {
|
||||
ASSERT (MemoryMap != NULL);
|
||||
if (OldMemoryMapSize - *MemoryMapSize < (*DescriptorSize) * AdditionalRecordCount) {
|
||||
*MemoryMapSize = *MemoryMapSize + (*DescriptorSize) * AdditionalRecordCount;
|
||||
//
|
||||
|
Loading…
x
Reference in New Issue
Block a user