From 49437f71812c3f2bb2bd95005b574e045401ebba Mon Sep 17 00:00:00 2001 From: noloader Date: Thu, 9 Jul 2015 09:15:39 +0000 Subject: 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 --- cryptlib.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cryptlib.h b/cryptlib.h index 906d498..89d52ba 100644 --- a/cryptlib.h +++ b/cryptlib.h @@ -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(v); } -- cgit v1.2.1