summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--MdePkg/Library/BasePeCoffLib/BasePeCoff.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/MdePkg/Library/BasePeCoffLib/BasePeCoff.c b/MdePkg/Library/BasePeCoffLib/BasePeCoff.c
index 60036e1..c404054 100644
--- a/MdePkg/Library/BasePeCoffLib/BasePeCoff.c
+++ b/MdePkg/Library/BasePeCoffLib/BasePeCoff.c
@@ -1094,7 +1094,6 @@ PeCoffLoaderLoadImage (
UINTN Index;
CHAR8 *Base;
CHAR8 *End;
- CHAR8 *MaxEnd;
EFI_IMAGE_DATA_DIRECTORY *DirectoryEntry;
EFI_IMAGE_DEBUG_DIRECTORY_ENTRY *DebugEntry;
UINTN Size;
@@ -1220,7 +1219,7 @@ PeCoffLoaderLoadImage (
// Load each section of the image
//
Section = FirstSection;
- for (Index = 0, MaxEnd = NULL; Index < NumberOfSections; Index++) {
+ for (Index = 0; Index < NumberOfSections; Index++) {
//
// Read the section
//
@@ -1251,10 +1250,6 @@ PeCoffLoaderLoadImage (
End = (CHAR8 *)((UINTN) End + sizeof (EFI_TE_IMAGE_HEADER) - (UINTN)Hdr.Te->StrippedSize);
}
- if (End > MaxEnd) {
- MaxEnd = End;
- }
-
if (Section->SizeOfRawData > 0) {
if (!(ImageContext->IsTeImage)) {
Status = ImageContext->ImageRead (