]> git.proxmox.com Git - mirror_edk2.git/commit
MdeModulePkg AcpiTableDxe: Use Rsdt to check against NULL
authorStar Zeng <star.zeng@intel.com>
Mon, 7 Mar 2016 06:01:46 +0000 (14:01 +0800)
committerStar Zeng <star.zeng@intel.com>
Tue, 8 Mar 2016 10:05:16 +0000 (18:05 +0800)
commitefef6ad6d7487606782a5d4aa09656fb606129d6
tree9c4f080ec7109495b1f89c4a70015367d03da98a
parentace1d0517b656a6d15484e875d73c0fe661ac8c7
MdeModulePkg AcpiTableDxe: Use Rsdt to check against NULL

Some static scan tool may regard CurrentRsdtEntry to be potentially
referenced to NULL pointer if CurrentRsdtEntry == NULL is used in
the right above if condition judgment.

        CopyMem (CurrentRsdtEntry, CurrentRsdtEntry + 1, (*NumberOfTableEntries - Index) * sizeof (UINT32));

It is introduced by commit f9bbb8d9c3f065faba9f266cf4e731fe2ca70c4d.
To avoid it and have same style with
"((Xsdt == NULL) || CurrentTablePointer64 == (UINT64) (UINTN) Table->Table)",
use Rsdt instead of CurrentRsdtEntry to check against NULL.

Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: Shumin Qiu <shumin.qiu@intel.com>
Cc: Feng Tian <feng.tian@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Star Zeng <star.zeng@intel.com>
Reviewed-by: Shumin Qiu <shumin.qiu@intel.com>
MdeModulePkg/Universal/Acpi/AcpiTableDxe/AcpiTableProtocol.c