Merge aa22009887 into merged_master (Bitcoin PR bitcoin/bitcoin#25700)

This commit is contained in:
Byron Hambly 2024-10-18 14:29:24 +02:00
commit fc7842e042

View file

@ -1642,6 +1642,9 @@ struct PSBTOutput
s >> leaf_hashes;
size_t after_hashes = s.size();
size_t hashes_len = before_hashes - after_hashes;
if (hashes_len > value_len) {
throw std::ios_base::failure("Output Taproot BIP32 keypath has an invalid length");
}
size_t origin_len = value_len - hashes_len;
m_tap_bip32_paths.emplace(xonly, std::make_pair(leaf_hashes, DeserializeKeyOrigin(s, origin_len)));
break;