From: "Lu, James" <james.lu@intel.com>
To: devel@edk2.groups.io
Cc: James Lu <james.lu@intel.com>, Ray Ni <ray.ni@intel.com>,
Guo Dong <guo.dong@intel.com>, Gua Guo <gua.guo@intel.com>
Subject: [PATCH] UefiPayloadPkg: Fix RelaAddress type always mismatch in if condition
Date: Mon, 11 Jul 2022 13:05:31 +0800 [thread overview]
Message-ID: <6749516ae40598938d4a7447d5d607aa6ad52756.1657515840.git.james.lu@intel.com> (raw)
From: James Lu <james.lu@intel.com>
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>
---
UefiPayloadPkg/PayloadLoaderPeim/ElfLib/Elf32Lib.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
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);
--
2.26.2.windows.1
next reply other threads:[~2022-07-11 5:05 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-07-11 5:05 Lu, James [this message]
2022-07-20 6:57 ` [PATCH] UefiPayloadPkg: Fix RelaAddress type always mismatch in if condition Lu, James
2022-07-21 0:00 ` Guo Dong
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-list from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=6749516ae40598938d4a7447d5d607aa6ad52756.1657515840.git.james.lu@intel.com \
--to=devel@edk2.groups.io \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox