diff options
author | Qiu Shumin <shumin.qiu@intel.com> | 2016-02-25 13:00:28 +0800 |
---|---|---|
committer | Hao Wu <hao.a.wu@intel.com> | 2016-07-04 10:27:39 +0800 |
commit | c66d055551d1db71fdf52ce36553b6b042eeab53 (patch) | |
tree | 144ff60f22aa2150deb2d8b8041ff18d9fdfc43a | |
parent | 4e53ba2d9d2184efcfe0a413b80e938d05d9bde1 (diff) | |
download | edk2-platforms-c66d055551d1db71fdf52ce36553b6b042eeab53.tar.xz |
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>
(cherry picked from commit 4cb6375ca6ddf73577758a72b1464896c3eae767)
-rw-r--r-- | MdeModulePkg/Core/Dxe/Misc/PropertiesTable.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/MdeModulePkg/Core/Dxe/Misc/PropertiesTable.c b/MdeModulePkg/Core/Dxe/Misc/PropertiesTable.c index dcdd8a9ec1..06f3451b4e 100644 --- a/MdeModulePkg/Core/Dxe/Misc/PropertiesTable.c +++ b/MdeModulePkg/Core/Dxe/Misc/PropertiesTable.c @@ -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;
//
|