Page MenuHomePhabricator

psbt: check that various indexes and amounts are within bounds
ClosedPublic

Authored by deadalnix on Oct 24 2020, 01:07.

Details

Summary
  • Don't calculate tx fees for PSBTs with invalid money values

In decodepsbt if an invalid amount is seen, don't calculate the fee
but still show the invalid value in the decode.

In analyze psbt, if an invalid amount is seen, set the next step to
be the creator as the creator needs to remake the transaction so that
it is valid.

  • psbt: check output index is within bounds before accessing

This is a backport of Core PR17156

Because we only have segwit style UTXO due to our signature algorithm, some checks and test case are not relevent to us.

Test Plan
ninja all check-all

Diff Detail

Repository
rABC Bitcoin ABC
Lint
Lint Not Applicable
Unit
Tests Not Applicable