Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
TxToUniv: check ptxoutwit->vchRangeproof.size() before secp256k1_rang…
…eproof_info() Otherwise, ```e1-cli sendrawtransaction 02000000010161616161616161616161616161616161616161616161616161616161616161610000000000ffffffff0100000000000000000000010100000000 ``` results in ``` #0 0x00007ffff65686ab in raise () from /lib64/libc.so.6 #1 0x00007ffff6551539 in abort () from /lib64/libc.so.6 ElementsProject#2 0x0000555555e199bb in secp256k1_default_illegal_callback_fn (str=<optimized out>, data=<optimized out>) at src/secp256k1.c:52 ElementsProject#3 0x0000555555e2b8fc in secp256k1_callback_call (cb=<optimized out>, cb=<optimized out>, text=0x555555f35057 "proof != NULL") at src/util.h:24 ElementsProject#4 secp256k1_rangeproof_info (ctx=<optimized out>, exp=<optimized out>, mantissa=<optimized out>, min_value=<optimized out>, max_value=<optimized out>, proof=<optimized out>, plen=0) at src/modules/rangeproof/main_impl.h:230 ElementsProject#5 0x0000555555cb2768 in TxToUniv (tx=..., hashBlock=..., entry=..., include_hex=false, serialize_flags=0) at core_write.cpp:330 ElementsProject#6 0x00005555557c3f42 in decoderawtransaction (request=...) at rpc/rawtransaction.cpp:684 ``` This is because the transaction contains nValue in txout that have empty commitment. It is considered 'not explicit', but it is also not confidential. To me, it seems that empty nValue (empty commitment) is not valid at all, and probably this should have been caught in the transaction decoding code.
- Loading branch information