Skip to content

Commit

Permalink
[safehook] Note the previous INT 0x13 handler
Browse files Browse the repository at this point in the history
Cache a record of a safe hook's ancestor in the chain.
  • Loading branch information
Shao Miller committed Dec 13, 2012
1 parent 9470847 commit a795c96
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/include/safehook.h
Expand Up @@ -127,6 +127,9 @@ struct S_WV_SAFE_HOOK_BUS {

/** PnP bus relations. A safe hook can only have one child, at most */
DEVICE_RELATIONS BusRelations[1];

/** A record of the previous INT 0x13 handler in the chain */
S_X86_SEG16OFF16 PreviousInt13hHandler[1];
};

#endif /* WV_M_PROBE_H_ */
1 change: 1 addition & 0 deletions src/winvblock/safehook/probe.c
Expand Up @@ -238,6 +238,7 @@ static NTSTATUS STDCALL WvSafeHookDriveDevice(
bus->PhysicalDeviceObject = pdo;
bus->BusRelations->Count = 0;
bus->BusRelations->Objects[0] = NULL;
bus->PreviousInt13hHandler[0] = hook->PrevHook;

/* Attach the FDO to the PDO */
if (!WvlAttachDeviceToDeviceStack(fdo, pdo)) {
Expand Down

0 comments on commit a795c96

Please sign in to comment.