aboutsummaryrefslogtreecommitdiff
path: root/src/bitcoin-tx.cpp
diff options
context:
space:
mode:
authorWladimir J. van der Laan <laanwj@gmail.com>2017-04-26 12:24:48 +0200
committerWladimir J. van der Laan <laanwj@gmail.com>2017-04-26 12:29:05 +0200
commit6fdb31916589c8996ab9edcec8cd18f6ef7eddad (patch)
treee9a2c933a29e2b3a3ed6b72c47367259f8ec73b6 /src/bitcoin-tx.cpp
parentbd9ec0ef1ea73209ba9e491e4b7847c895ca7a2f (diff)
parent1d31093d4d8501a5dc031413a963707f6cae0e0a (diff)
Merge #9743: Fix several potential issues found by sanitizers
1d31093 fix tsan: utiltime race on nMockTime (Pieter Wuille) 321bbc2 fix ubsan: bitcoin-tx: not initialize context before IsFullyValid (Pieter Wuille) Tree-SHA512: 39ea83c6122f06339cd425deb236357694e84ce2e4e9c61c10b90a8909b6e42e8c7b76396175cdc4723ababd2fa4f935d48f8a469baf853c5a06d7b962a5c8dc
Diffstat (limited to 'src/bitcoin-tx.cpp')
-rw-r--r--src/bitcoin-tx.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/bitcoin-tx.cpp b/src/bitcoin-tx.cpp
index 83b855cbcf..45738b5df8 100644
--- a/src/bitcoin-tx.cpp
+++ b/src/bitcoin-tx.cpp
@@ -657,11 +657,13 @@ static void MutateTx(CMutableTransaction& tx, const std::string& command,
MutateTxDelOutput(tx, commandVal);
else if (command == "outaddr")
MutateTxAddOutAddr(tx, commandVal);
- else if (command == "outpubkey")
+ else if (command == "outpubkey") {
+ if (!ecc) { ecc.reset(new Secp256k1Init()); }
MutateTxAddOutPubKey(tx, commandVal);
- else if (command == "outmultisig")
+ } else if (command == "outmultisig") {
+ if (!ecc) { ecc.reset(new Secp256k1Init()); }
MutateTxAddOutMultiSig(tx, commandVal);
- else if (command == "outscript")
+ } else if (command == "outscript")
MutateTxAddOutScript(tx, commandVal);
else if (command == "outdata")
MutateTxAddOutData(tx, commandVal);