diff options
| author | Pieter Wuille <[email protected]> | 2017-02-10 18:03:14 -0800 |
|---|---|---|
| committer | Pieter Wuille <[email protected]> | 2017-04-20 06:25:15 -0700 |
| commit | 321bbc2079e2dc3648ae4eaf845f5b71d30b423a (patch) | |
| tree | c2bb05a147c5ccb6c32cac1d738df8c4394741b7 /src/bitcoin-tx.cpp | |
| parent | Merge #9294: Use internal HD chain for change outputs (hd split) (diff) | |
| download | discoin-321bbc2079e2dc3648ae4eaf845f5b71d30b423a.tar.xz discoin-321bbc2079e2dc3648ae4eaf845f5b71d30b423a.zip | |
fix ubsan: bitcoin-tx: not initialize context before IsFullyValid
Diffstat (limited to 'src/bitcoin-tx.cpp')
| -rw-r--r-- | src/bitcoin-tx.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/bitcoin-tx.cpp b/src/bitcoin-tx.cpp index 61e0eb74e..4b64a9682 100644 --- a/src/bitcoin-tx.cpp +++ b/src/bitcoin-tx.cpp @@ -651,11 +651,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); |