зеркало из https://github.com/microsoft/Detours.git
Correct ARM64 SIZE_OF_JMP from 8 to 16 and spell out 2*4 as 8. (#11)
This is a lot of bytes to overwrite, and it precludes patching a number of small-ish functions, but it is how many. For example, automatic following imports, has lead to system service stubs, that were smaller than this (and aligned less than this).
This commit is contained in:
Родитель
e48b14118f
Коммит
dfa375637e
|
@ -893,7 +893,7 @@ struct _DETOUR_TRAMPOLINE
|
|||
C_ASSERT(sizeof(_DETOUR_TRAMPOLINE) == 120);
|
||||
|
||||
enum {
|
||||
SIZE_OF_JMP = 8
|
||||
SIZE_OF_JMP = 16
|
||||
};
|
||||
|
||||
inline ULONG fetch_opcode(PBYTE pbCode)
|
||||
|
@ -915,7 +915,7 @@ PBYTE detour_gen_jmp_immediate(PBYTE pbCode, PBYTE *ppPool, PBYTE pbJmpVal)
|
|||
pbLiteral = *ppPool;
|
||||
}
|
||||
else {
|
||||
pbLiteral = pbCode + 2*4;
|
||||
pbLiteral = pbCode + 8;
|
||||
}
|
||||
|
||||
*((PBYTE*&)pbLiteral) = pbJmpVal;
|
||||
|
|
Загрузка…
Ссылка в новой задаче