diff options
author | Ruiyu Ni <ruiyu.ni@intel.com> | 2016-07-26 18:20:05 +0800 |
---|---|---|
committer | Ruiyu Ni <ruiyu.ni@intel.com> | 2016-07-27 10:27:11 +0800 |
commit | 96fcfdbfb068670b849a850bbed28ecad913af80 (patch) | |
tree | 18a74c8b1aeac6ad93010a4219cf282e4bc0817d /PcAtChipsetPkg | |
parent | 2502b73557ae2a9014b4367e85740e209d14c06e (diff) | |
download | edk2-platforms-96fcfdbfb068670b849a850bbed28ecad913af80.tar.xz |
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>
Diffstat (limited to 'PcAtChipsetPkg')
-rw-r--r-- | PcAtChipsetPkg/PcatRealTimeClockRuntimeDxe/PcRtc.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/PcAtChipsetPkg/PcatRealTimeClockRuntimeDxe/PcRtc.c b/PcAtChipsetPkg/PcatRealTimeClockRuntimeDxe/PcRtc.c index b86c1f4bed..40d2e49173 100644 --- a/PcAtChipsetPkg/PcatRealTimeClockRuntimeDxe/PcRtc.c +++ b/PcAtChipsetPkg/PcatRealTimeClockRuntimeDxe/PcRtc.c @@ -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) {
|