mirror of
https://github.com/veracrypt/VeraCrypt.git
synced 2025-11-11 02:58:02 -06:00
Windows: Fix regression causing crash when a wrong password is used when changing password of volumes
This commit is contained in:
@@ -5443,7 +5443,7 @@ namespace VeraCrypt
|
|||||||
finally_do_arg (PCRYPTO_INFO, cryptoInfo, { if (finally_arg) crypto_close (finally_arg); });
|
finally_do_arg (PCRYPTO_INFO, cryptoInfo, { if (finally_arg) crypto_close (finally_arg); });
|
||||||
|
|
||||||
// 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 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 ((status == 0) && cryptoInfo->bVulnerableMasterKey)
|
||||||
status = ERR_SYSENC_XTS_MASTERKEY_VULNERABLE;
|
status = ERR_SYSENC_XTS_MASTERKEY_VULNERABLE;
|
||||||
|
|
||||||
if (status != 0)
|
if (status != 0)
|
||||||
|
|||||||
@@ -372,7 +372,7 @@ int ChangePwd (const wchar_t *lpszVolume, Password *oldPassword, int old_pkcs5,
|
|||||||
nStatus = 0; // We can ignore this error here
|
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 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;
|
nStatus = ERR_XTS_MASTERKEY_VULNERABLE;
|
||||||
|
|
||||||
if (nStatus == ERR_PASSWORD_WRONG)
|
if (nStatus == ERR_PASSWORD_WRONG)
|
||||||
|
|||||||
@@ -692,7 +692,7 @@ static int ExpandVolume (HWND hwndDlg, wchar_t *lpszVolume, Password *pVolumePas
|
|||||||
nStatus = 0; // We can ignore this error here
|
nStatus = 0; // We can ignore this error here
|
||||||
|
|
||||||
// if the volume master key is vulnerable, print a warning to inform the user
|
// if the volume master key is vulnerable, print a warning to inform the user
|
||||||
if (cryptoInfo->bVulnerableMasterKey)
|
if ((nStatus == 0) && cryptoInfo->bVulnerableMasterKey)
|
||||||
{
|
{
|
||||||
DebugAddProgressDlgStatus(hwndDlg, GetString ("ERR_XTS_MASTERKEY_VULNERABLE_SHORT"));
|
DebugAddProgressDlgStatus(hwndDlg, GetString ("ERR_XTS_MASTERKEY_VULNERABLE_SHORT"));
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user