VeraCrypt
aboutsummaryrefslogtreecommitdiff
path: root/src/Main/Forms
diff options
context:
space:
mode:
authorMounir IDRASSI <mounir.idrassi@idrix.fr>2016-09-25 06:47:51 +0200
committerMounir IDRASSI <mounir.idrassi@idrix.fr>2016-10-17 18:40:15 +0200
commit69c8c9d6c6d21b0bf3e0db8fc790ac6b25ea6f02 (patch)
treea07a86aec8d8ea29a69bb50c9bb164369b3fe797 /src/Main/Forms
parent77d070fe7384bfb0c6dece81e4900e603b13ee6c (diff)
downloadVeraCrypt-69c8c9d6c6d21b0bf3e0db8fc790ac6b25ea6f02.tar.gz
VeraCrypt-69c8c9d6c6d21b0bf3e0db8fc790ac6b25ea6f02.zip
Linux/MacOSX: add missing check for PIM max value on volume creation wizard
Diffstat (limited to 'src/Main/Forms')
-rw-r--r--src/Main/Forms/VolumePimWizardPage.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/Main/Forms/VolumePimWizardPage.cpp b/src/Main/Forms/VolumePimWizardPage.cpp
index 723ca8cc..8ce23043 100644
--- a/src/Main/Forms/VolumePimWizardPage.cpp
+++ b/src/Main/Forms/VolumePimWizardPage.cpp
@@ -39,7 +39,8 @@ namespace VeraCrypt
if (pimStr.IsEmpty())
return 0;
if (((size_t) wxNOT_FOUND == pimStr.find_first_not_of (wxT("0123456789")))
- && pimStr.ToLong (&pim))
+ && pimStr.ToLong (&pim)
+ && pim <= MAX_PIM_VALUE)
return (int) pim;
else
return -1;