mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-16 13:01:19 +02:00
fix invalid memory access that I added when merging descriptor wallets
Thanks, ubsan + fuzzer!
This commit is contained in:
parent
98d0ff7035
commit
fec99efb8f
1 changed files with 1 additions and 1 deletions
|
|
@ -506,11 +506,11 @@ bool SignTransaction(CMutableTransaction& mtx, const SigningProvider* keystore,
|
||||||
prevTxOut = GetPeginOutputFromWitness(mtx.witness.vtxinwit[i].m_pegin_witness);
|
prevTxOut = GetPeginOutputFromWitness(mtx.witness.vtxinwit[i].m_pegin_witness);
|
||||||
} else {
|
} else {
|
||||||
auto coin = coins.find(txin.prevout);
|
auto coin = coins.find(txin.prevout);
|
||||||
prevTxOut = coin->second.out;
|
|
||||||
if (coin == coins.end() || coin->second.IsSpent()) {
|
if (coin == coins.end() || coin->second.IsSpent()) {
|
||||||
input_errors[i] = "Input not found or already spent";
|
input_errors[i] = "Input not found or already spent";
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
prevTxOut = coin->second.out;
|
||||||
}
|
}
|
||||||
|
|
||||||
const CScript& prevPubKey = prevTxOut.scriptPubKey;
|
const CScript& prevPubKey = prevTxOut.scriptPubKey;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue