mirror of
https://github.com/donnaskiez/ac.git
synced 2024-11-21 22:24:08 +01:00
small fix
This commit is contained in:
parent
0b729a6fa0
commit
0e6f4def14
1 changed files with 11 additions and 2 deletions
|
@ -691,7 +691,16 @@ DoesRetInstructionCauseException(_In_ UINT64 ReturnAddress)
|
||||||
if (IsUserModeAddress(ReturnAddress))
|
if (IsUserModeAddress(ReturnAddress))
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
RtlCopyMemory(&opcodes, ReturnAddress, sizeof(opcodes));
|
if (!MmIsAddressValid(ReturnAddress))
|
||||||
|
return FALSE;
|
||||||
|
|
||||||
|
/* Shoudln't really ever occur */
|
||||||
|
__try {
|
||||||
|
RtlCopyMemory(&opcodes, ReturnAddress, sizeof(opcodes));
|
||||||
|
}
|
||||||
|
__except (EXCEPTION_EXECUTE_HANDLER) {
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
if (opcodes[0] == INSTRUCTION_UD2_BYTE_1 &&
|
if (opcodes[0] == INSTRUCTION_UD2_BYTE_1 &&
|
||||||
opcodes[1] == INSTRUCTION_UD2_BYTE_2)
|
opcodes[1] == INSTRUCTION_UD2_BYTE_2)
|
||||||
|
@ -700,7 +709,7 @@ DoesRetInstructionCauseException(_In_ UINT64 ReturnAddress)
|
||||||
if (opcodes[0] == INSTRUCTION_INT3_BYTE_1)
|
if (opcodes[0] == INSTRUCTION_INT3_BYTE_1)
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
|
||||||
DEBUG_VERBOSE("Ret address instruction doesnt throw exception");
|
DEBUG_VERBOSE("Ret address instruction doesnt unconditionally throw exception");
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue