VeraCrypt
aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMounir IDRASSI <mounir.idrassi@idrix.fr>2019-11-03 22:55:21 +0100
committerMounir IDRASSI <mounir.idrassi@idrix.fr>2019-11-04 00:10:00 +0100
commit54c7e1cfd3a98368352028def5faaedc017edc17 (patch)
tree581453950100048297b002f9e691122c844cf75e
parenta7d5b6a4774c92736c89e8d6122b13c75c8d17c8 (diff)
downloadVeraCrypt-54c7e1cfd3a98368352028def5faaedc017edc17.tar.gz
VeraCrypt-54c7e1cfd3a98368352028def5faaedc017edc17.zip
Windows: Display error message when password is too long and legacy maximum length used
-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 2439c106..376a1b29 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);
}