Fixed sizeof

This commit is contained in:
XaFF-XaFF 2023-03-26 12:35:11 +02:00
parent d3a921a585
commit f8451972bd
1 changed files with 1 additions and 1 deletions

View File

@ -164,7 +164,7 @@ BOOL PatchInstruction(const char* path)
// Calculate the address of the jump target
DWORD jumpTargetAddress = ntHeader->OptionalHeader.ImageBase + caveSectionHeader->VirtualAddress;
DWORD jumpOffset = jumpTargetAddress - (ntHeader->OptionalHeader.ImageBase + entryPointRva + sizeof(5));
DWORD jumpOffset = jumpTargetAddress - (ntHeader->OptionalHeader.ImageBase + entryPointRva + sizeof(unsigned char));
// Patch the entry point with a jump instruction to the .cave section
unsigned char bytes[5];