mirror of
https://github.com/acidanthera/audk.git
synced 2025-09-22 17:27:44 +02:00
MdePkg/BasePeCoffLib2: Fix invalid ASSERT for when RelocDirSize == 0
This commit is contained in:
parent
4d8020f9e7
commit
0c7d4d57cb
@ -796,6 +796,12 @@ PeCoffRuntimeRelocateImage (
|
|||||||
ASSERT (Image != NULL);
|
ASSERT (Image != NULL);
|
||||||
ASSERT (BaseAddress != 0);
|
ASSERT (BaseAddress != 0);
|
||||||
ASSERT (RuntimeContext != NULL);
|
ASSERT (RuntimeContext != NULL);
|
||||||
|
//
|
||||||
|
// If the relocation directory is empty, skip relocation.
|
||||||
|
//
|
||||||
|
if (RuntimeContext->RelocDirSize == 0) {
|
||||||
|
return RETURN_SUCCESS;
|
||||||
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// The arithmetics in this function generally cannot overflow due to the
|
// The arithmetics in this function generally cannot overflow due to the
|
||||||
|
Loading…
x
Reference in New Issue
Block a user