aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorWladimir J. van der Laan <laanwj@gmail.com>2011-10-01 02:47:47 +0200
committerLuke Dashjr <luke-jr+git@utopios.org>2011-10-01 19:04:24 -0400
commit20cff2ade4d686fb4f10c106dbc99b76c173102a (patch)
treebffdf74ddcf7a889453b3ad5a7afe647d865429c /src
parent7944d81567bf3aca8547e4a39456b0058120219c (diff)
remove possibility of 63 bit overflow in ParseMoney
Diffstat (limited to 'src')
-rw-r--r--src/util.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/util.cpp b/src/util.cpp
index 76a2700271..d6a113095d 100644
--- a/src/util.cpp
+++ b/src/util.cpp
@@ -389,7 +389,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;