diff options
author | Mounir IDRASSI <mounir.idrassi@idrix.fr> | 2021-08-02 00:27:07 +0200 |
---|---|---|
committer | Mounir IDRASSI <mounir.idrassi@idrix.fr> | 2021-08-02 00:57:25 +0200 |
commit | 6986dce63ecf60e26203dab42a1c5bb383cbf203 (patch) | |
tree | 21faf1272385c0217f5559f81620b8aec2226eec | |
parent | 2e32adf625b0f3ee1e5859163011e81d3f17a89b (diff) | |
download | VeraCrypt-6986dce63ecf60e26203dab42a1c5bb383cbf203.tar.gz VeraCrypt-6986dce63ecf60e26203dab42a1c5bb383cbf203.zip |
Windows: clear DeriveKeyWork work item only if they have correct type
-rw-r--r-- | src/Common/EncryptionThreadPool.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/Common/EncryptionThreadPool.c b/src/Common/EncryptionThreadPool.c index dce01733..f62f8772 100644 --- a/src/Common/EncryptionThreadPool.c +++ b/src/Common/EncryptionThreadPool.c @@ -517,9 +517,12 @@ void EncryptionThreadPoolStop () for (i = 0; i < sizeof (WorkItemQueue) / sizeof (WorkItemQueue[0]); ++i) { #if !defined(DEVICE_DRIVER) - burn (WorkItemQueue[i].KeyDerivation.Password, sizeof(WorkItemQueue[i].KeyDerivation.Password)); - burn (WorkItemQueue[i].KeyDerivation.Salt, sizeof(WorkItemQueue[i].KeyDerivation.Salt)); - VirtualUnlock (&WorkItemQueue[i].KeyDerivation, sizeof (WorkItemQueue[i].KeyDerivation)); + if (WorkItemQueue[i].Type == DeriveKeyWork) + { + burn (WorkItemQueue[i].KeyDerivation.Password, sizeof(WorkItemQueue[i].KeyDerivation.Password)); + burn (WorkItemQueue[i].KeyDerivation.Salt, sizeof(WorkItemQueue[i].KeyDerivation.Salt)); + VirtualUnlock (&WorkItemQueue[i].KeyDerivation, sizeof (WorkItemQueue[i].KeyDerivation)); + } #endif if (WorkItemQueue[i].ItemCompletedEvent) CloseHandle (WorkItemQueue[i].ItemCompletedEvent); |