mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-01-25 10:43:19 -03:00
[BugFix]: Do not allow deserializing PSBT with empty PSBT_OUT_TAP_TREE
This commit is contained in:
parent
c336f813b3
commit
0652dc53b2
1 changed files with 3 additions and 0 deletions
|
@ -862,6 +862,9 @@ struct PSBTOutput
|
|||
std::vector<unsigned char> tree_v;
|
||||
s >> tree_v;
|
||||
SpanReader s_tree(s.GetType(), s.GetVersion(), tree_v);
|
||||
if (s_tree.empty()) {
|
||||
throw std::ios_base::failure("Output Taproot tree must not be empty");
|
||||
}
|
||||
while (!s_tree.empty()) {
|
||||
uint8_t depth;
|
||||
uint8_t leaf_ver;
|
||||
|
|
Loading…
Add table
Reference in a new issue