From b261177b8f5bc3f8495406d13dc03c0328b930f9 Mon Sep 17 00:00:00 2001 From: Mounir IDRASSI Date: Mon, 2 May 2016 14:45:22 +0200 Subject: Windows/Linux/MacOSX: Set maximum PIM value to 2147468 in order to avoid having negative values for iterations count using the formula 15000 + (PIM x 1000). Add specific error message to XML language files. --- src/Main/Forms/MountOptionsDialog.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/Main/Forms/MountOptionsDialog.cpp') diff --git a/src/Main/Forms/MountOptionsDialog.cpp b/src/Main/Forms/MountOptionsDialog.cpp index 207d2479..55098b0e 100644 --- a/src/Main/Forms/MountOptionsDialog.cpp +++ b/src/Main/Forms/MountOptionsDialog.cpp @@ -94,13 +94,13 @@ namespace VeraCrypt ProtectionPasswordPanel->GetVolumePim() : 0; /* invalid PIM: set focus to PIM field and stop processing */ - if (-1 == Pim) + if (-1 == Pim || (PartitionInSystemEncryptionScopeCheckBox->IsChecked() && Pim > MAX_BOOT_PIM_VALUE)) { PasswordPanel->SetFocusToPimTextCtrl(); return; } - if (-1 == ProtectionPim) + if (-1 == ProtectionPim || (PartitionInSystemEncryptionScopeCheckBox->IsChecked() && ProtectionPim > MAX_BOOT_PIM_VALUE)) { ProtectionPasswordPanel->SetFocusToPimTextCtrl(); return; -- cgit v1.2.3