mirror of
https://github.com/veracrypt/VeraCrypt.git
synced 2025-11-11 11:08:02 -06:00
Windows vulnerability fix: CryptAcquireContext vulnerability fix. Add checks to random generator to abort in case of error and display a diagnose message to the user.
This commit is contained in:
@@ -476,7 +476,10 @@ void ExpandVolumeWizard (HWND hwndDlg, char *lpszVolume)
|
||||
}
|
||||
|
||||
if (Randinit() != ERR_SUCCESS) {
|
||||
nStatus = ERR_PARAMETER_INCORRECT;
|
||||
if (CryptoAPILastError == ERROR_SUCCESS)
|
||||
nStatus = ERR_RAND_INIT_FAILED;
|
||||
else
|
||||
nStatus = ERR_CAPI_INIT_FAILED;
|
||||
goto error;
|
||||
}
|
||||
|
||||
|
||||
@@ -602,7 +602,13 @@ static int ExpandVolume (HWND hwndDlg, char *lpszVolume, Password *pVolumePasswo
|
||||
}
|
||||
|
||||
if (Randinit ())
|
||||
goto error; // note: nStatus == ERR_OS_ERROR
|
||||
{
|
||||
if (CryptoAPILastError == ERROR_SUCCESS)
|
||||
nStatus = ERR_RAND_INIT_FAILED;
|
||||
else
|
||||
nStatus = ERR_CAPI_INIT_FAILED;
|
||||
goto error;
|
||||
}
|
||||
|
||||
if (!bDevice && bPreserveTimestamp)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user