VeraCrypt
aboutsummaryrefslogtreecommitdiff
path: root/src/Common/Dictionary.c
diff options
context:
space:
mode:
authorMounir IDRASSI <mounir.idrassi@idrix.fr>2015-02-08 23:36:01 +0100
committerMounir IDRASSI <mounir.idrassi@idrix.fr>2015-02-09 11:01:11 +0100
commitde0c30dded45ea9956a2e7b241ce16641b30492f (patch)
treecb2d39b7c73b02d1180e57877f21641682c29e6f /src/Common/Dictionary.c
parent1ab00f3e3cac1754abcb1d91edf01198b24a32a2 (diff)
downloadVeraCrypt-de0c30dded45ea9956a2e7b241ce16641b30492f.tar.gz
VeraCrypt-de0c30dded45ea9956a2e7b241ce16641b30492f.zip
Static Code Analysis: handle unused variables more properly. Catch STL exception. Add more checks. Add proper cast to arithmetic operations.
Diffstat (limited to 'src/Common/Dictionary.c')
-rw-r--r--src/Common/Dictionary.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/Common/Dictionary.c b/src/Common/Dictionary.c
index 382e6b70..d6203e6b 100644
--- a/src/Common/Dictionary.c
+++ b/src/Common/Dictionary.c
@@ -22,11 +22,15 @@ static size_t DataPoolSize = 0;
void AddDictionaryEntry (char *key, int intKey, void *value)
{
- if (key)
- StringKeyMap[key] = value;
+ try
+ {
+ if (key)
+ StringKeyMap[key] = value;
- if (intKey != 0)
- IntKeyMap[intKey] = value;
+ if (intKey != 0)
+ IntKeyMap[intKey] = value;
+ }
+ catch (exception&) {}
}