mirror of
https://github.com/wavestone-cdt/EDRSandblast.git
synced 2026-06-08 16:37:12 +00:00
Added some safety check in hook resolving code
This commit is contained in:
@@ -432,6 +432,11 @@ PVOID hookResolver(PBYTE hookAddr) {
|
|||||||
PBYTE destination = hookAddr;
|
PBYTE destination = hookAddr;
|
||||||
BOOL hasFollowedJmp = FALSE;
|
BOOL hasFollowedJmp = FALSE;
|
||||||
while (TRUE) {
|
while (TRUE) {
|
||||||
|
MEMORY_BASIC_INFORMATION mbi;
|
||||||
|
VirtualQuery(destination, &mbi, sizeof(mbi));
|
||||||
|
if (mbi.State != MEM_COMMIT) {
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
switch (destination[0]) {
|
switch (destination[0]) {
|
||||||
case 0xE9:
|
case 0xE9:
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user