diff options
author | Ruiyu Ni <ruiyu.ni@intel.com> | 2016-07-26 18:20:05 +0800 |
---|---|---|
committer | Hao Wu <hao.a.wu@intel.com> | 2016-07-27 16:29:44 +0800 |
commit | a80dc4a58d29b30575196fe7f32215f7e17577a3 (patch) | |
tree | 9390c6862b2d3cfb4a7ad93a4879f8cd738411cf /PcAtChipsetPkg | |
parent | 11e9a7ed0d35b3eedff38b504d50e0350b2ed92a (diff) | |
download | edk2-platforms-a80dc4a58d29b30575196fe7f32215f7e17577a3.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>
(cherry picked from commit 96fcfdbfb068670b849a850bbed28ecad913af80)
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) {
|