summaryrefslogtreecommitdiffstats
path: root/UefiPayloadPkg
diff options
context:
space:
mode:
authorJames Lu <james.lu@intel.com>2022-07-10 22:05:31 -0700
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>2022-07-27 17:00:40 +0000
commit2677286307c67b62c198cf6890d62ec540dd8c99 (patch)
tree18583b8c8d3f7d7eac28d0ba4fc1b5c80d516edc /UefiPayloadPkg
parente3d468acb9ce26a75fee45d742619ac1c6683280 (diff)
downloadedk2-2677286307c67b62c198cf6890d62ec540dd8c99.tar.gz
edk2-2677286307c67b62c198cf6890d62ec540dd8c99.tar.bz2
edk2-2677286307c67b62c198cf6890d62ec540dd8c99.zip
UefiPayloadPkg: Fix RelaAddress type always mismatch in if condition
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3984 Under function RolocateElfDynamic() in Elf32Lib.c if (RelaAddress == MAX_UINT64) is always FALSE while RelaAddress is UINT32 Fix is to modify if condition check to "if (RelaAddress == MAX_UINT32)" Cc: Ray Ni <ray.ni@intel.com> Cc: Guo Dong <guo.dong@intel.com> Cc: Gua Guo <gua.guo@intel.com> Signed-off-by: James Lu <james.lu@intel.com> Reviewed-by: Guo Dong <guo.dong@intel.com>
Diffstat (limited to 'UefiPayloadPkg')
-rw-r--r--UefiPayloadPkg/PayloadLoaderPeim/ElfLib/Elf32Lib.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/UefiPayloadPkg/PayloadLoaderPeim/ElfLib/Elf32Lib.c b/UefiPayloadPkg/PayloadLoaderPeim/ElfLib/Elf32Lib.c
index b002c4b9cf..cb915e7142 100644
--- a/UefiPayloadPkg/PayloadLoaderPeim/ElfLib/Elf32Lib.c
+++ b/UefiPayloadPkg/PayloadLoaderPeim/ElfLib/Elf32Lib.c
@@ -292,7 +292,7 @@ RelocateElf32Dynamic (
}
}
- if (RelaAddress == MAX_UINT64) {
+ if (RelaAddress == MAX_UINT32) {
ASSERT (RelaCount == 0);
ASSERT (RelaEntrySize == 0);
ASSERT (RelaSize == 0);