VeraCrypt
aboutsummaryrefslogtreecommitdiff
path: root/src/Common/Password.c
diff options
context:
space:
mode:
authorMounir IDRASSI <mounir.idrassi@idrix.fr>2024-08-24 18:02:16 +0200
committerMounir IDRASSI <mounir.idrassi@idrix.fr>2024-08-24 18:02:16 +0200
commit380ca35c6d34437380de252058bb68817c925810 (patch)
tree263661fac35adfeaf8bb51aa3260a6f21be12b07 /src/Common/Password.c
parent25c88fe3d30c4df4aa8bf7c64b165f92886965b9 (diff)
downloadVeraCrypt-380ca35c6d34437380de252058bb68817c925810.tar.gz
VeraCrypt-380ca35c6d34437380de252058bb68817c925810.zip
Windows: Fix regression causing crash when a wrong password is used when changing password of volumes
Diffstat (limited to 'src/Common/Password.c')
-rw-r--r--src/Common/Password.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/Common/Password.c b/src/Common/Password.c
index f20dd257..c0247207 100644
--- a/src/Common/Password.c
+++ b/src/Common/Password.c
@@ -372,7 +372,7 @@ int ChangePwd (const wchar_t *lpszVolume, Password *oldPassword, int old_pkcs5,
nStatus = 0; // We can ignore this error here
// if the XTS master key is vulnerable, return error and do not allow the user to change the password since the master key will not be changed
- if (cryptoInfo->bVulnerableMasterKey)
+ if ((nStatus == 0) && cryptoInfo->bVulnerableMasterKey)
nStatus = ERR_XTS_MASTERKEY_VULNERABLE;
if (nStatus == ERR_PASSWORD_WRONG)