VeraCrypt
aboutsummaryrefslogtreecommitdiff
path: root/src/Driver/DriveFilter.c
diff options
context:
space:
mode:
authorMounir IDRASSI <mounir.idrassi@idrix.fr>2016-02-07 01:15:37 (GMT)
committerMounir IDRASSI <mounir.idrassi@idrix.fr>2016-02-07 01:39:45 (GMT)
commit8518d558346fe41bfc6208d8fb49ae8428b6f651 (patch)
treebaa5e0b5396d012e0b3080e2ec34aef5dd4ce6cb /src/Driver/DriveFilter.c
parentae7ec4802a81770ff164e465b8d1fb51624ca093 (diff)
downloadVeraCrypt-8518d558346fe41bfc6208d8fb49ae8428b6f651.zip
VeraCrypt-8518d558346fe41bfc6208d8fb49ae8428b6f651.tar.gz
Windows Driver: if saving volume header fails, don't mark operation as successful so that it will be retried later.
Diffstat (limited to 'src/Driver/DriveFilter.c')
-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 c153a1a..eba7c40 100644
--- a/src/Driver/DriveFilter.c
+++ b/src/Driver/DriveFilter.c
@@ -1545,9 +1545,11 @@ static VOID SetupThreadProc (PVOID threadArg)
{
status = SaveDriveVolumeHeader (Extension);
ASSERT (NT_SUCCESS (status));
-
- headerUpdateRequired = FALSE;
- bytesWrittenSinceHeaderUpdate = 0;
+ if (NT_SUCCESS (status))
+ {
+ headerUpdateRequired = FALSE;
+ bytesWrittenSinceHeaderUpdate = 0;
+ }
}
}