mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-04-17 02:57:33 +02:00
util: check MoneyRange() inside ParseMoney()
This commit is contained in:
@@ -81,5 +81,9 @@ std::optional<CAmount> ParseMoney(const std::string& money_string)
|
||||
|
||||
CAmount value = nWhole * COIN + nUnits;
|
||||
|
||||
if (!MoneyRange(value)) {
|
||||
return std::nullopt;
|
||||
}
|
||||
|
||||
return value;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user