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/TextUserInterface.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/Main/TextUserInterface.cpp') diff --git a/src/Main/TextUserInterface.cpp b/src/Main/TextUserInterface.cpp index 632552b7..bddfc0b2 100644 --- a/src/Main/TextUserInterface.cpp +++ b/src/Main/TextUserInterface.cpp @@ -182,6 +182,12 @@ namespace VeraCrypt try { pim = (int) StringConverter::ToUInt32 (pimStr); + if (pim > MAX_PIM_VALUE) + { + pim = -1; + ShowError ("PIM_TOO_BIG"); + continue; + } } catch (...) { -- cgit v1.2.3