audk/MdeModulePkg/Core/Dxe
Jian J Wang 61a62fc258 MdeModulePkg/Core: fix an issue of potential NULL pointer access
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1286

This issue is introduced by bb685071c2.

The *MemorySpaceMap assigned with NULL (line 1710) value might be
accessed (line 1726/1730) without any sanity check. Although it won't
happen in practice because of line 1722, we still need to add check
against NULL to make static code analyzer happy.

1710  *MemorySpaceMap       = NULL;
....  ...
1722  if (DescriptorCount == *NumberOfDescriptors) {
....  ...
1726    Descriptor = *MemorySpaceMap;
....  ...
1730        BuildMemoryDescriptor (Descriptor, Entry);

Tests:
  Pass build and boot to shell.

Cc: Hao Wu <hao.a.wu@intel.com>
Cc: Star Zeng <star.zeng@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Jian J Wang <jian.j.wang@intel.com>
Reviewed-by: Hao Wu <hao.a.wu@intel.com>
2018-10-30 10:16:03 +08:00
..
Dispatcher MdeModulePkg DxeCore: Handle multiple FV images in one FV file 2018-09-03 17:04:58 +08:00
DxeMain MdeModulePkg Core/Dxe: Remove redundant functions 2018-08-21 16:29:04 +08:00
Event MdeModulePkg: Clean up source files 2018-06-28 11:19:45 +08:00
FwVol MdeModulePkg: Clean up source files 2018-06-28 11:19:45 +08:00
FwVolBlock MdeModulePkg: Clean up source files 2018-06-28 11:19:45 +08:00
Gcd MdeModulePkg/Core: fix an issue of potential NULL pointer access 2018-10-30 10:16:03 +08:00
Hand MdeModulePkg: Clean up source files 2018-06-28 11:19:45 +08:00
Image MdeModulePkg: Clean up source files 2018-06-28 11:19:45 +08:00
Library
Mem MdeModulePkg/Core: correct one coding style 2018-10-27 21:33:13 +08:00
Misc MdeModulePkg/Core: add freed-memory guard feature 2018-10-26 10:30:35 +08:00
SectionExtraction MdeModulePkg: Clean up source files 2018-06-28 11:19:45 +08:00
DxeCore.uni MdeModulePkg: Clean up source files 2018-06-28 11:19:45 +08:00
DxeCoreExtra.uni MdeModulePkg: Clean up source files 2018-06-28 11:19:45 +08:00
DxeMain.h MdeModulePkg Core/Dxe: Remove redundant functions 2018-08-21 16:29:04 +08:00
DxeMain.inf MdeModulePkg: Removing ipf which is no longer supported from edk2. 2018-09-06 15:25:16 +08:00