diff options
author | noloader <noloader@57ff6487-cd31-0410-9ec3-f628ee90f5f0> | 2015-07-09 09:15:39 +0000 |
---|---|---|
committer | noloader <noloader@57ff6487-cd31-0410-9ec3-f628ee90f5f0> | 2015-07-09 09:15:39 +0000 |
commit | 49437f71812c3f2bb2bd95005b574e045401ebba (patch) | |
tree | 62eeaf40bb8e614600dece1ff5066b5d11731ff0 /cryptlib.h | |
parent | 2d4b3d58c671ec0c58a381b2ebe9e2f3aad55556 (diff) | |
download | cryptopp-49437f71812c3f2bb2bd95005b574e045401ebba.tar.gz |
Added test for 'v<0' in GetAsUIntValue
git-svn-id: svn://svn.code.sf.net/p/cryptopp/code/trunk/c5@577 57ff6487-cd31-0410-9ec3-f628ee90f5f0
Diffstat (limited to 'cryptlib.h')
-rw-r--r-- | cryptlib.h | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -303,7 +303,7 @@ public: CRYPTOPP_DLL unsigned int GetAsUIntValueWithDefault(const char *name, unsigned int defaultValue) const { int v; - if(!GetValue(name, v)) return defaultValue; + if(!GetValue(name, v) || v < 0) return defaultValue; return static_cast<unsigned int>(v); } |