We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c5c00a5 commit 5ec53c0Copy full SHA for 5ec53c0
1 file changed
qml/bitcoinamount.cpp
@@ -4,6 +4,8 @@
4
5
#include <qml/bitcoinamount.h>
6
7
+#include <limits>
8
+
9
#include <QRegularExpression>
10
#include <QStringList>
11
@@ -131,6 +133,10 @@ qint64 BitcoinAmount::btcToSats(const QString& btcSanitized)
131
133
frac = parts[1].leftJustified(8, '0').toLongLong();
132
134
}
135
136
+ if (whole > std::numeric_limits<qint64>::max() / COIN) {
137
+ return std::numeric_limits<qint64>::max();
138
+ }
139
140
return whole * COIN + frac;
141
142
0 commit comments