From 69c8c9d6c6d21b0bf3e0db8fc790ac6b25ea6f02 Mon Sep 17 00:00:00 2001 From: Mounir IDRASSI Date: Sun, 25 Sep 2016 06:47:51 +0200 Subject: Linux/MacOSX: add missing check for PIM max value on volume creation wizard --- src/Main/Forms/VolumePimWizardPage.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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; -- cgit v1.2.3