From 453ef927ef734320a715de12ec8536e3a642bc26 Mon Sep 17 00:00:00 2001 From: Mounir IDRASSI Date: Sun, 3 Mar 2019 00:18:48 +0100 Subject: Windows: Add option to use legacy maximum password length (64 characters) instead of new maximum length (128) in UI and command line. This will users who were relying on the UI truncating the passwords to the first 64 characters in the previous versions of VeraCrypt. --- src/Common/Password.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/Common/Password.c') diff --git a/src/Common/Password.c b/src/Common/Password.c index a5050d75..ca0dd468 100644 --- a/src/Common/Password.c +++ b/src/Common/Password.c @@ -112,7 +112,7 @@ BOOL CheckPasswordCharEncoding (HWND hPassword, Password *ptrPw) wchar_t s[MAX_PASSWORD + 1]; len = GetWindowTextLength (hPassword); - if (len > MAX_PASSWORD) + if (len > (bUseLegacyMaxPasswordLength? MAX_LEGACY_PASSWORD: MAX_PASSWORD)) return FALSE; GetWindowTextW (hPassword, s, sizeof (s) / sizeof (wchar_t)); -- cgit v1.2.3