VeraCrypt
aboutsummaryrefslogtreecommitdiff
path: root/src/Driver
diff options
context:
space:
mode:
authorMounir IDRASSI <mounir.idrassi@idrix.fr>2017-07-05 07:52:13 +0200
committerMounir IDRASSI <mounir.idrassi@idrix.fr>2017-07-05 16:21:35 +0200
commit384c5cc259398d6e8039684f266ea94e9e11c191 (patch)
treec2c172a60105fa35fcc17bc85022f1be8f4d81f1 /src/Driver
parentb0827e9b74eb8c5400ac4ad20cba9dcb4eaac6c3 (diff)
downloadVeraCrypt-384c5cc259398d6e8039684f266ea94e9e11c191.tar.gz
VeraCrypt-384c5cc259398d6e8039684f266ea94e9e11c191.zip
Windows Driver: correctly get KeRestoreExtendedProcessorState function pointer.
Diffstat (limited to 'src/Driver')
-rw-r--r--src/Driver/Ntdriver.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/Driver/Ntdriver.c b/src/Driver/Ntdriver.c
index 7ada065b..83cf7dee 100644
--- a/src/Driver/Ntdriver.c
+++ b/src/Driver/Ntdriver.c
@@ -129,10 +129,11 @@ NTSTATUS DriverEntry (PDRIVER_OBJECT DriverObject, PUNICODE_STRING RegistryPath)
// KeSaveExtendedProcessorState/KeRestoreExtendedProcessorState are available starting from Windows 7
if ((OsMajorVersion > 6) || (OsMajorVersion == 6 && OsMinorVersion >= 1))
{
- UNICODE_STRING funcName;
- RtlInitUnicodeString(&funcName, L"KeSaveExtendedProcessorState");
- KeSaveExtendedProcessorStatePtr = (KeSaveExtendedProcessorStateFn) MmGetSystemRoutineAddress(&funcName);
- KeRestoreExtendedProcessorStatePtr = (KeRestoreExtendedProcessorStateFn) MmGetSystemRoutineAddress(&funcName);
+ UNICODE_STRING saveFuncName, restoreFuncName;
+ RtlInitUnicodeString(&saveFuncName, L"KeSaveExtendedProcessorState");
+ RtlInitUnicodeString(&restoreFuncName, L"KeRestoreExtendedProcessorState");
+ KeSaveExtendedProcessorStatePtr = (KeSaveExtendedProcessorStateFn) MmGetSystemRoutineAddress(&saveFuncName);
+ KeRestoreExtendedProcessorStatePtr = (KeRestoreExtendedProcessorStateFn) MmGetSystemRoutineAddress(&restoreFuncName);
}
// Load dump filter if the main driver is already loaded