Skip to content

Commit

Permalink
UefiPayloadPkg: Fix RelaAddress type always mismatch in if condition
Browse files Browse the repository at this point in the history
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 <[email protected]>
Cc: Guo Dong <[email protected]>
Cc: Gua Guo <[email protected]>
Signed-off-by: James Lu <[email protected]>
Reviewed-by: Guo Dong <[email protected]>
  • Loading branch information
jameslu8 authored and mergify[bot] committed Jul 27, 2022
1 parent e3d468a commit 2677286
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion UefiPayloadPkg/PayloadLoaderPeim/ElfLib/Elf32Lib.c
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,7 @@ RelocateElf32Dynamic (
}
}

if (RelaAddress == MAX_UINT64) {
if (RelaAddress == MAX_UINT32) {
ASSERT (RelaCount == 0);
ASSERT (RelaEntrySize == 0);
ASSERT (RelaSize == 0);
Expand Down

0 comments on commit 2677286

Please sign in to comment.