VeraCrypt
aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMounir IDRASSI <mounir.idrassi@idrix.fr>2019-11-03 21:55:21 (GMT)
committerMounir IDRASSI <mounir.idrassi@idrix.fr>2019-11-03 23:10:00 (GMT)
commit54c7e1cfd3a98368352028def5faaedc017edc17 (patch)
tree581453950100048297b002f9e691122c844cf75e /src
parenta7d5b6a4774c92736c89e8d6122b13c75c8d17c8 (diff)
downloadVeraCrypt-54c7e1cfd3a98368352028def5faaedc017edc17.zip
VeraCrypt-54c7e1cfd3a98368352028def5faaedc017edc17.tar.gz
Windows: Display error message when password is too long and legacy maximum length used
Diffstat (limited to 'src')
-rw-r--r--src/Common/Dlgcode.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/Common/Dlgcode.c b/src/Common/Dlgcode.c
index 2439c10..376a1b2 100644
--- a/src/Common/Dlgcode.c
+++ b/src/Common/Dlgcode.c
@@ -13104,7 +13104,7 @@ BOOL GetPassword (HWND hwndDlg, UINT ctrlID, char* passValue, int bufSize, BOOL
{
SetFocus (GetDlgItem(hwndDlg, ctrlID));
if (GetLastError () == ERROR_INSUFFICIENT_BUFFER)
- Error ("PASSWORD_UTF8_TOO_LONG", hwndDlg);
+ Error ((bufSize == (MAX_LEGACY_PASSWORD + 1))? "LEGACY_PASSWORD_UTF8_TOO_LONG": "PASSWORD_UTF8_TOO_LONG", hwndDlg);
else
Error ("PASSWORD_UTF8_INVALID", hwndDlg);
}