diff options
author | Matthijs Lavrijsen <mattiwatti@gmail.com> | 2021-01-30 04:42:06 +0100 |
---|---|---|
committer | Matthijs Lavrijsen <mattiwatti@gmail.com> | 2021-01-30 04:42:06 +0100 |
commit | f8ca8c0c008980352c2b3eee6eda21f395bde4cf (patch) | |
tree | 85338bffac330fd39700d45c6c0828d83d3651d6 /EfiGuardDxe/PatchBootmgr.c | |
parent | dceaa9c1c416fc68e3a9e29db34cd04d83cb76ec (diff) |
Use PE runtime function tables for finding function start addressesv1.1.1
Diffstat (limited to 'EfiGuardDxe/PatchBootmgr.c')
-rw-r--r-- | EfiGuardDxe/PatchBootmgr.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/EfiGuardDxe/PatchBootmgr.c b/EfiGuardDxe/PatchBootmgr.c index aa27135..5c3c481 100644 --- a/EfiGuardDxe/PatchBootmgr.c +++ b/EfiGuardDxe/PatchBootmgr.c @@ -300,7 +300,7 @@ PatchBootManager( // Found signature; backtrack to function start // Note: pOriginalAddress is a pointer to a (function) pointer, because the original address depends on the type of boot manager we are patching. VOID **pOriginalAddress = PatchingBootmgrEfi ? &gOriginalBootmgrImgArchStartBootApplication : &gOriginalBootmgfwImgArchStartBootApplication; - *pOriginalAddress = (VOID*)BacktrackToFunctionStart(Found, MAX((UINT8*)ImageBase + CodeSection->VirtualAddress, Found - 1024)); + *pOriginalAddress = (VOID*)BacktrackToFunctionStart((UINT8*)ImageBase, NtHeaders, Found); CONST VOID* OriginalAddress = *pOriginalAddress; if (OriginalAddress == NULL) { |