mirror of https://github.com/acidanthera/audk.git
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…
Reference in New Issue