VeraCrypt
aboutsummaryrefslogtreecommitdiff
path: root/src/Main/Forms/VolumePasswordWizardPage.cpp
diff options
context:
space:
mode:
authorMounir IDRASSI <mounir.idrassi@idrix.fr>2015-11-30 10:35:41 (GMT)
committerMounir IDRASSI <mounir.idrassi@idrix.fr>2015-11-30 12:58:19 (GMT)
commitefa436974d8203485eec6faa1bf0116bb32f6fcd (patch)
tree97a5ef2eea0310a12db399151de7ca97dbd47ece /src/Main/Forms/VolumePasswordWizardPage.cpp
parentcfadb231d24bd292a6ea3708b776bde8f06e50ab (diff)
downloadVeraCrypt-efa436974d8203485eec6faa1bf0116bb32f6fcd.zip
VeraCrypt-efa436974d8203485eec6faa1bf0116bb32f6fcd.tar.gz
Linux/MacOSX: Implement Unicode passwords suppport. Make validation of parameters in GUI more robust.
Diffstat (limited to 'src/Main/Forms/VolumePasswordWizardPage.cpp')
-rw-r--r--src/Main/Forms/VolumePasswordWizardPage.cpp15
1 files changed, 11 insertions, 4 deletions
diff --git a/src/Main/Forms/VolumePasswordWizardPage.cpp b/src/Main/Forms/VolumePasswordWizardPage.cpp
index f90f275..d2fa48a 100644
--- a/src/Main/Forms/VolumePasswordWizardPage.cpp
+++ b/src/Main/Forms/VolumePasswordWizardPage.cpp
@@ -35,9 +35,16 @@ namespace VeraCrypt
if (ConfirmationMode && !PasswordPanel->PasswordsMatch())
return false;
- shared_ptr <KeyfileList> keyfiles (GetKeyfiles());
- shared_ptr <VolumePassword> password (GetPassword());
-
- return (password && !GetPassword()->IsEmpty()) || (keyfiles && !keyfiles->empty());
+ try
+ {
+ shared_ptr <KeyfileList> keyfiles (GetKeyfiles());
+ shared_ptr <VolumePassword> password (GetPassword());
+
+ return (password && !GetPassword()->IsEmpty()) || (keyfiles && !keyfiles->empty());
+ }
+ catch (PasswordException&)
+ {
+ return false;
+ }
}
}