aboutsummaryrefslogtreecommitdiff
path: root/src/util
diff options
context:
space:
mode:
authorMarcoFalke <falke.marco@gmail.com>2020-02-29 00:29:04 +0700
committerMarcoFalke <falke.marco@gmail.com>2020-02-29 00:25:58 +0700
commit8888461f6814ae8b6221b02049fb9e1f69a5ff70 (patch)
tree5e6b4bb86f94b1c9ef02caba2d36156bc49b059b /src/util
parentfab30b61eb51538a4db62e34f7133c44575b3fe9 (diff)
util: Fail to parse empty string in ParseMoney
Diffstat (limited to 'src/util')
-rw-r--r--src/util/moneystr.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/util/moneystr.cpp b/src/util/moneystr.cpp
index 981cb1b267..40d8918dfc 100644
--- a/src/util/moneystr.cpp
+++ b/src/util/moneystr.cpp
@@ -37,6 +37,10 @@ bool ParseMoney(const std::string& str, CAmount& nRet)
return false;
}
+ if (str.empty()) {
+ return false;
+ }
+
std::string strWhole;
int64_t nUnits = 0;
const char* p = str.c_str();