From 162d3b5f64d0e1849c566898854cb9fbc0d8ebc2 Mon Sep 17 00:00:00 2001 From: Mounir IDRASSI Date: Tue, 9 Oct 2018 14:48:11 +0200 Subject: [PATCH] Windows Driver: fix regression that was causing BSOD. --- src/Driver/Ntdriver.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Driver/Ntdriver.c b/src/Driver/Ntdriver.c index a86fc95b..582df290 100644 --- a/src/Driver/Ntdriver.c +++ b/src/Driver/Ntdriver.c @@ -2043,7 +2043,7 @@ NTSTATUS ProcessMainDeviceControlIrp (PDEVICE_OBJECT DeviceObject, PEXTENSION Ex request->CustomUserMessage[0] = 0; // Search for the string "VeraCrypt" - for (i = 0; i < sizeof (readBuffer) - strlen (TC_APP_NAME); ++i) + for (i = 0; i < TC_SECTOR_SIZE_BIOS - strlen (TC_APP_NAME); ++i) { if (memcmp (readBuffer + i, TC_APP_NAME, strlen (TC_APP_NAME)) == 0) {