CreateTransaction() with non-solvable inputs (example: import a P2SH script) are leading to a crash.
CalculateMaximumSignedInputSize(change_prototype_txout, this); can return -1 in case of non-solvable input which gets directly loaded into a size_t container CoinSelectionParams::change_spend_size resulting to overflow back to size_t::max.
This should correctly detect the non-solvability and return an error.
A commit (to pull in here) with a function test is welcome.