summaryrefslogtreecommitdiffstats
path: root/UefiCpuPkg
diff options
context:
space:
mode:
authorJian J Wang <jian.j.wang@intel.com>2018-10-29 16:20:44 +0800
committerJian J Wang <jian.j.wang@intel.com>2018-10-30 10:16:03 +0800
commit61a62fc2587ae4d01718124f28e1ea0e60375902 (patch)
tree1b65c2a6f5f59f4eee1af5fec9c4a6dcfad5b16d /UefiCpuPkg
parentc87ac38cf280fa969f1033de3c5b7a157aac8cbc (diff)
downloadedk2-61a62fc2587ae4d01718124f28e1ea0e60375902.tar.gz
edk2-61a62fc2587ae4d01718124f28e1ea0e60375902.tar.bz2
edk2-61a62fc2587ae4d01718124f28e1ea0e60375902.zip
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 bb685071c2602cf786ea84c69bbebf2158194a38. 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>
Diffstat (limited to 'UefiCpuPkg')
0 files changed, 0 insertions, 0 deletions