python-bitcoinlib icon indicating copy to clipboard operation
python-bitcoinlib copied to clipboard

CTransaction.stream_deserialize allows empty witness record when witness is signalled

Open dgpv opened this issue 5 years ago • 0 comments
trafficstars

in CTransaction.stream_deserialize(), if it detects that witness is signalled, it just tries to deserialize the witness and does not check if it is null. Core has a check in this case:

         if (!tx.HasWitness()) {
            /* It's illegal to encode witnesses when all witness stacks are empty. */
            throw std::ios_base::failure("Superfluous witness record");
        }

dgpv avatar Dec 31 '19 12:12 dgpv