diff options
author | Matthijs Lavrijsen <mattiwatti@gmail.com> | 2021-05-12 12:53:34 +0200 |
---|---|---|
committer | Matthijs Lavrijsen <mattiwatti@gmail.com> | 2021-05-12 12:53:34 +0200 |
commit | 58d4e2643e147696f908c86f7fb6bf55d08ae9bd (patch) | |
tree | 71ad68b0e2888e8e5fb5a96c8dc33ba944207407 /EfiGuardDxe/EfiGuardDxe.c | |
parent | f8ca8c0c008980352c2b3eee6eda21f395bde4cf (diff) |
Fix Resharper warnings
Diffstat (limited to 'EfiGuardDxe/EfiGuardDxe.c')
-rw-r--r-- | EfiGuardDxe/EfiGuardDxe.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/EfiGuardDxe/EfiGuardDxe.c b/EfiGuardDxe/EfiGuardDxe.c index f61cfd6..4d28559 100644 --- a/EfiGuardDxe/EfiGuardDxe.c +++ b/EfiGuardDxe/EfiGuardDxe.c @@ -197,7 +197,7 @@ HookedLoadImage( else { // Determine the type of file we're loading - CONST INPUT_FILETYPE FileType = GetInputFileType((UINT8*)LoadedImage->ImageBase, LoadedImage->ImageSize); + CONST INPUT_FILETYPE FileType = GetInputFileType(LoadedImage->ImageBase, LoadedImage->ImageSize); ASSERT(FileType == Unknown || FileType == Bootmgr || FileType == BootmgfwEfi); if (FileType == BootmgfwEfi) @@ -263,7 +263,7 @@ HookedSetVariable( Data != NULL) { // Yep, and Attributes and DataSize are correct. Check if *Data is a valid input for a backdoor read/write operation - EFIGUARD_BACKDOOR_DATA* BackdoorData = (EFIGUARD_BACKDOOR_DATA*)Data; + EFIGUARD_BACKDOOR_DATA* BackdoorData = Data; if (BackdoorData->CookieValue == EFIGUARD_BACKDOOR_COOKIE_VALUE && BackdoorData->Size > 0 && (UINTN)BackdoorData->KernelAddress >= (UINTN)MM_SYSTEM_RANGE_START) @@ -306,7 +306,7 @@ HookedSetVariable( } case 8: { - CONST UINT64 NewQword = (UINT64)BackdoorData->u.Qword; + CONST UINT64 NewQword = BackdoorData->u.Qword; BackdoorData->u.Qword = *(UINT64*)BackdoorData->KernelAddress; if (!BackdoorData->IsReadOperation) *(UINT64*)BackdoorData->KernelAddress = NewQword; @@ -602,7 +602,7 @@ EfiGuardInitialize( // // Hook gRT->SetVariable // - mOriginalSetVariable = (EFI_SET_VARIABLE)SetServicePointer(&gRT->Hdr, (VOID**)&gRT->SetVariable, (VOID**)&HookedSetVariable); + mOriginalSetVariable = (EFI_SET_VARIABLE)SetServicePointer(&gRT->Hdr, (VOID**)&gRT->SetVariable, (VOID*)&HookedSetVariable); Print(L"Hooked gRT->SetVariable: 0x%p -> 0x%p\r\n", (VOID*)mOriginalSetVariable, (VOID*)&HookedSetVariable); // Register notification callback for ExitBootServices() |