PcAtChipsetPkg/PcRtc: Fix a stack corruption issue

In 32bit environment, ScanTableInSDT() incorrectly copies 8 bytes
of data to 4-byte pointer Table, which causes the stack corruption.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ruiyu Ni <ruiyu.ni@intel.com>
Reviewed-by: Eric Dong <eric.dong@intel.com>
This commit is contained in:
Ruiyu Ni 2016-07-26 18:20:05 +08:00
parent 2502b73557
commit 96fcfdbfb0
1 changed files with 1 additions and 1 deletions

View File

@ -1271,7 +1271,7 @@ GetCenturyRtcAddress (
Fadt = NULL;
if (Rsdp->Revision >= EFI_ACPI_2_0_ROOT_SYSTEM_DESCRIPTION_POINTER_REVISION) {
Xsdt = (EFI_ACPI_DESCRIPTION_HEADER *) (UINTN) Rsdp->XsdtAddress;
Fadt = ScanTableInSDT (Xsdt, EFI_ACPI_2_0_FIXED_ACPI_DESCRIPTION_TABLE_SIGNATURE, sizeof (UINT64));
Fadt = ScanTableInSDT (Xsdt, EFI_ACPI_2_0_FIXED_ACPI_DESCRIPTION_TABLE_SIGNATURE, sizeof (UINTN));
}
if (Fadt == NULL) {