Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 1 addition & 5 deletions MdePkg/Library/BasePeCoffLib/BasePeCoff.c
Original file line number Diff line number Diff line change
Expand Up @@ -1056,6 +1056,7 @@ PeCoffLoaderRelocateImage (
RelocDir = &Hdr.Te->DataDirectory[0];
}

RelocBase = RelocBaseEnd = NULL;
if ((RelocDir != NULL) && (RelocDir->Size > 0)) {
Status = SafeUint32Add (RelocDir->VirtualAddress, (RelocDir->Size - 1), &EndAddress);
if (!RETURN_ERROR (Status)) {
Expand All @@ -1072,11 +1073,6 @@ PeCoffLoaderRelocateImage (
DEBUG ((DEBUG_ERROR, "Relocation block is not valid\n"));
return RETURN_LOAD_ERROR;
}
} else {
//
// Set base and end to bypass processing below.
//
RelocBase = RelocBaseEnd = NULL;
}

RelocBaseOrg = RelocBase;
Expand Down
Loading