Linux/MacOSX: add missing check for PIM max value on volume creation wizard

This commit is contained in:
Mounir IDRASSI 2016-09-25 06:47:51 +02:00
parent 77d070fe73
commit 69c8c9d6c6
No known key found for this signature in database
GPG key ID: DD0C382D5FCFB8FC

View file

@ -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;