mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-01-21 15:50:07 +01:00
remove possibility of 63 bit overflow in ParseMoney
This commit is contained in:
committed by
Luke Dashjr
parent
7944d81567
commit
20cff2ade4
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user