diff options
-rw-r--r-- | EfiGuardDxe/PatchNtoskrnl.c | 2 | ||||
-rw-r--r-- | EfiGuardDxe/PatchWinload.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/EfiGuardDxe/PatchNtoskrnl.c b/EfiGuardDxe/PatchNtoskrnl.c index bcdb8cc..c11d460 100644 --- a/EfiGuardDxe/PatchNtoskrnl.c +++ b/EfiGuardDxe/PatchNtoskrnl.c @@ -612,7 +612,7 @@ PatchNtoskrnl( { CHAR8 SectionName[EFI_IMAGE_SIZEOF_SHORT_NAME + 1]; CopyMem(SectionName, Section->Name, EFI_IMAGE_SIZEOF_SHORT_NAME); - SectionName[MAX(sizeof("PAGE"), sizeof("INIT"))] = '\0'; // Null terminate so we don't match lookalikes like INITDATA and PAGEVRFY + SectionName[EFI_IMAGE_SIZEOF_SHORT_NAME] = '\0'; if (AsciiStrCmp(SectionName, "INIT") == 0) InitSection = Section; diff --git a/EfiGuardDxe/PatchWinload.c b/EfiGuardDxe/PatchWinload.c index 1a37de4..2182fb9 100644 --- a/EfiGuardDxe/PatchWinload.c +++ b/EfiGuardDxe/PatchWinload.c @@ -581,7 +581,7 @@ PatchWinload( { CHAR8 SectionName[EFI_IMAGE_SIZEOF_SHORT_NAME + 1]; CopyMem(SectionName, Section->Name, EFI_IMAGE_SIZEOF_SHORT_NAME); - SectionName[MAX(sizeof(".text"), sizeof(".rdata"))] = '\0'; + SectionName[EFI_IMAGE_SIZEOF_SHORT_NAME] = '\0'; if (AsciiStrCmp(SectionName, ".text") == 0) CodeSection = Section; |