diff options
| author | Wladimir J. van der Laan <[email protected]> | 2011-10-01 02:47:47 +0200 |
|---|---|---|
| committer | Wladimir J. van der Laan <[email protected]> | 2011-10-01 17:29:46 +0200 |
| commit | 2f7f2a5fca52f064a2f5663ab46c7c16e1b117f8 (patch) | |
| tree | d6711b3f81f68e00cc5caf56840788215a1796ec /src/util.cpp | |
| parent | Merge pull request #524 from sipa/signandverif (diff) | |
| download | discoin-2f7f2a5fca52f064a2f5663ab46c7c16e1b117f8.tar.xz discoin-2f7f2a5fca52f064a2f5663ab46c7c16e1b117f8.zip | |
remove possibility of 63 bit overflow in ParseMoney
- also, add unit tests for various functions in util.cpp/util.h
Diffstat (limited to 'src/util.cpp')
| -rw-r--r-- | src/util.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
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; |