VeraCrypt
aboutsummaryrefslogtreecommitdiff
path: root/src/Common
diff options
context:
space:
mode:
authorMounir IDRASSI <mounir.idrassi@idrix.fr>2021-08-02 00:27:07 +0200
committerMounir IDRASSI <mounir.idrassi@idrix.fr>2021-08-02 00:57:25 +0200
commit6986dce63ecf60e26203dab42a1c5bb383cbf203 (patch)
tree21faf1272385c0217f5559f81620b8aec2226eec /src/Common
parent2e32adf625b0f3ee1e5859163011e81d3f17a89b (diff)
downloadVeraCrypt-6986dce63ecf60e26203dab42a1c5bb383cbf203.tar.gz
VeraCrypt-6986dce63ecf60e26203dab42a1c5bb383cbf203.zip
Windows: clear DeriveKeyWork work item only if they have correct type
Diffstat (limited to 'src/Common')
-rw-r--r--src/Common/EncryptionThreadPool.c9
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);