remove possibility of 63 bit overflow in ParseMoney

This commit is contained in:
Wladimir J. van der Laan
2011-10-01 02:47:47 +02:00
committed by Luke Dashjr
parent 7944d81567
commit 20cff2ade4

View File

@@ -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;