VeraCrypt
aboutsummaryrefslogtreecommitdiff
path: root/src/Format
diff options
context:
space:
mode:
authorMounir IDRASSI <mounir.idrassi@idrix.fr>2019-02-04 10:37:37 (GMT)
committerMounir IDRASSI <mounir.idrassi@idrix.fr>2019-02-04 10:39:47 (GMT)
commit6bb1f24ed571bccd4d1d247dafdc1dda6eaa3d8d (patch)
treecf56d5e0f83ef2fa69580215e60b4106ac888897 /src/Format
parent5d3278bcf20d7b8039747a430f86b7dd5ef49a04 (diff)
downloadVeraCrypt-6bb1f24ed571bccd4d1d247dafdc1dda6eaa3d8d.zip
VeraCrypt-6bb1f24ed571bccd4d1d247dafdc1dda6eaa3d8d.tar.gz
Automatically truncate passwords for TrueCrypt volumes and System Encryption to the first 64 characters. This fix issues encountered by users of TrueCrypt volumes who were using passwords longer than 64 characters that were truncated in previous version.
Diffstat (limited to 'src/Format')
-rw-r--r--src/Format/Tcformat.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/Format/Tcformat.c b/src/Format/Tcformat.c
index e91a5bf..cbd0eec 100644
--- a/src/Format/Tcformat.c
+++ b/src/Format/Tcformat.c
@@ -5755,7 +5755,7 @@ BOOL CALLBACK PageDialogProc (HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPa
{
if (hw == EN_CHANGE)
{
- GetPassword (hCurPage, IDC_PASSWORD_DIRECT, (char*) volumePassword.Text, MAX_PASSWORD + 1, FALSE);
+ GetPassword (hCurPage, IDC_PASSWORD_DIRECT, (char*) volumePassword.Text, MAX_PASSWORD + 1, FALSE, FALSE);
volumePassword.Length = (unsigned __int32) strlen ((char *) volumePassword.Text);
return 1;
}
@@ -7575,7 +7575,7 @@ BOOL CALLBACK MainDialogProc (HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPa
}
// Store the password in case we need to restore it after keyfile is applied to it
- if (!GetPassword (hCurPage, IDC_PASSWORD, szRawPassword, sizeof (szRawPassword), TRUE))
+ if (!GetPassword (hCurPage, IDC_PASSWORD, szRawPassword, sizeof (szRawPassword), FALSE, TRUE))
return 1;
if (!SysEncInEffect ())
@@ -7684,7 +7684,7 @@ BOOL CALLBACK MainDialogProc (HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPa
{
WaitCursor ();
- if (!GetPassword (hCurPage, IDC_PASSWORD_DIRECT, (char*) volumePassword.Text, MAX_PASSWORD + 1, TRUE))
+ if (!GetPassword (hCurPage, IDC_PASSWORD_DIRECT, (char*) volumePassword.Text, MAX_PASSWORD + 1, FALSE, TRUE))
{
NormalCursor ();
return 1;
@@ -7696,7 +7696,7 @@ BOOL CALLBACK MainDialogProc (HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lPa
volumePim = GetPim (hCurPage, IDC_PIM, 0);
// Store the password in case we need to restore it after keyfile is applied to it
- if (!GetPassword (hCurPage, IDC_PASSWORD_DIRECT, szRawPassword, sizeof (szRawPassword), TRUE))
+ if (!GetPassword (hCurPage, IDC_PASSWORD_DIRECT, szRawPassword, sizeof (szRawPassword), FALSE, TRUE))
{
NormalCursor ();
return 1;
@@ -8791,7 +8791,7 @@ ovf_end:
else if (nCurPageNo == PASSWORD_PAGE)
{
// Store the password in case we need to restore it after keyfile is applied to it
- GetPassword (hCurPage, IDC_PASSWORD, szRawPassword, sizeof (szRawPassword), FALSE);
+ GetPassword (hCurPage, IDC_PASSWORD, szRawPassword, sizeof (szRawPassword), FALSE, FALSE);
VerifyPasswordAndUpdate (hwndDlg, GetDlgItem (MainDlg, IDC_NEXT),
GetDlgItem (hCurPage, IDC_PASSWORD),
@@ -8833,7 +8833,7 @@ ovf_end:
|| nCurPageNo == NONSYS_INPLACE_ENC_RESUME_PASSWORD_PAGE)
{
// Store the password in case we need to restore it after keyfile is applied to it
- GetPassword (hCurPage, IDC_PASSWORD_DIRECT, szRawPassword, MAX_PASSWORD + 1, FALSE);
+ GetPassword (hCurPage, IDC_PASSWORD_DIRECT, szRawPassword, MAX_PASSWORD + 1, FALSE, FALSE);
memcpy (volumePassword.Text, szRawPassword, MAX_PASSWORD + 1);
volumePassword.Length = (unsigned __int32) strlen ((char *) volumePassword.Text);