From 2f7f2a5fca52f064a2f5663ab46c7c16e1b117f8 Mon Sep 17 00:00:00 2001 From: "Wladimir J. van der Laan" Date: Sat, 1 Oct 2011 02:47:47 +0200 Subject: remove possibility of 63 bit overflow in ParseMoney - also, add unit tests for various functions in util.cpp/util.h --- src/util.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/util.cpp') diff --git a/src/util.cpp b/src/util.cpp index fb648a972..02e2d2149 100644 --- a/src/util.cpp +++ b/src/util.cpp @@ -387,7 +387,7 @@ bool ParseMoney(const char* pszIn, int64& nRet) for (; *p; p++) if (!isspace(*p)) return false; - if (strWhole.size() > 14) + if (strWhole.size() > 10) // guard against 63 bit overflow return false; if (nUnits < 0 || nUnits > COIN) return false; -- cgit v1.2.3