VeraCrypt
aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMounir IDRASSI <mounir.idrassi@idrix.fr>2016-02-07 02:15:37 +0100
committerMounir IDRASSI <mounir.idrassi@idrix.fr>2016-02-07 02:39:45 +0100
commit8518d558346fe41bfc6208d8fb49ae8428b6f651 (patch)
treebaa5e0b5396d012e0b3080e2ec34aef5dd4ce6cb
parentae7ec4802a81770ff164e465b8d1fb51624ca093 (diff)
downloadVeraCrypt-8518d558346fe41bfc6208d8fb49ae8428b6f651.tar.gz
VeraCrypt-8518d558346fe41bfc6208d8fb49ae8428b6f651.zip
Windows Driver: if saving volume header fails, don't mark operation as successful so that it will be retried later.
-rw-r--r--src/Driver/DriveFilter.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/Driver/DriveFilter.c b/src/Driver/DriveFilter.c
index c153a1ad..eba7c40c 100644
--- a/src/Driver/DriveFilter.c
+++ b/src/Driver/DriveFilter.c
@@ -1544,11 +1544,13 @@ static VOID SetupThreadProc (PVOID threadArg)
if (bytesWrittenSinceHeaderUpdate >= TC_ENCRYPTION_SETUP_HEADER_UPDATE_THRESHOLD)
{
status = SaveDriveVolumeHeader (Extension);
ASSERT (NT_SUCCESS (status));
-
- headerUpdateRequired = FALSE;
- bytesWrittenSinceHeaderUpdate = 0;
+ if (NT_SUCCESS (status))
+ {
+ headerUpdateRequired = FALSE;
+ bytesWrittenSinceHeaderUpdate = 0;
+ }
}
}
abort: