]> git.proxmox.com Git - mirror_edk2.git/commit
MdePkg UefiLib: Check Table against NULL in ScanTableInSDT
authorStar Zeng <star.zeng@intel.com>
Fri, 19 Oct 2018 07:56:57 +0000 (15:56 +0800)
committerStar Zeng <star.zeng@intel.com>
Sun, 21 Oct 2018 01:57:44 +0000 (09:57 +0800)
commite7ac09b957561ba4533cb0a8297a568723ca8bd7
tree3f6e4ea8c863adfe26bb32fb22b413f1329dd094
parenta2e61f341d26a78751b2f19b5004c6bbfc8b4fa9
MdePkg UefiLib: Check Table against NULL in ScanTableInSDT

REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1266

af5e95215928e052445c473f1244412dadea8252 abstracted generic functions
from different modules (IntelVTdDxe, S3SaveStateDxe, PcRtc,
DpDynamicCommand and PiSmmCpuDxeSmm). Some of them (IntelVTdDxe and
PcRtc) checked Table against NULL before accessing Table->Signature,
some (S3SaveStateDxe, DpDynamicCommand and PiSmmCpuDxeSmm did not.

The ScanTableInSDT() in Acpi.c of UefiLib was mainly from
S3SaveStateDxe, so it does not check Table against NULL before
accessing Table->Signature.

This patch updates ScanTableInSDT() to check Table against NULL first
before accessing Table->Signature.

Cc: Liming Gao <liming.gao@intel.com>
Cc: Michael D Kinney <michael.d.kinney@intel.com>
Cc: Jian J Wang <jian.j.wang@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Star Zeng <star.zeng@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
Reviewed-by: Jian J Wang <jian.j.wang@intel.com>
MdePkg/Library/UefiLib/Acpi.c