dash/test/util/data
Wladimir J. van der Laan 44c7301288
Merge #13603: bitcoin-tx: Stricter check for valid integers
57889e688dd0987a1e087cd48d216a413127601e bitcoin-tx: Stricter check for valid integers (Daniel Kraft)

Pull request description:

  Just calling `atoi` to convert strings to integers does not check for valid integers very thoroughly; in particular, it just ignores everything starting from the first non-numeral character.  Even a string like "foo" is fine and silently returns 0.

  This meant that `bitcoin-tx` would not fail if such a string was passed in various places where an integer is expected (like the `locktime` or an input/output index); this means that it would, for instance, silently accept a typo and interpret it in an unexpected way.

  In this change, we use `ParseInt64` for parsing strings to integers, which actually verifies that the full string is valid as number.  New tests in the `bitcoin-util-test` cover the new error paths.

  This fixes #13599.

Tree-SHA512: 146a0af275e9f57784e5d0582d3defbac35551b54b6b7232f8a0b20db04aa611125e52aa4512ef2f8ed2cafc2a12fe586f9d10ed66d641cff090288f279b1988
2020-12-18 12:55:45 -06:00
..
bitcoin-util-test.json Merge #13603: bitcoin-tx: Stricter check for valid integers 2020-12-18 12:55:45 -06:00
blanktxv1.hex Merge bitcoin#9956: Reorganise qa directory (#2912) 2019-05-19 23:20:34 +03:00
blanktxv1.json Add missing tx type to TxToUniv (#3069) 2019-08-28 10:54:44 +03:00
blanktxv2.hex Merge bitcoin#9956: Reorganise qa directory (#2912) 2019-05-19 23:20:34 +03:00
blanktxv2.json Add missing tx type to TxToUniv (#3069) 2019-08-28 10:54:44 +03:00
tt-delin1-out.hex Merge bitcoin#9956: Reorganise qa directory (#2912) 2019-05-19 23:20:34 +03:00
tt-delin1-out.json Merge #11420: Bump univalue subtree and fix json formatting in tests 2020-01-12 17:01:40 -06:00
tt-delout1-out.hex Merge bitcoin#9956: Reorganise qa directory (#2912) 2019-05-19 23:20:34 +03:00
tt-delout1-out.json Merge #11420: Bump univalue subtree and fix json formatting in tests 2020-01-12 17:01:40 -06:00
tt-locktime317000-out.hex Merge bitcoin#9956: Reorganise qa directory (#2912) 2019-05-19 23:20:34 +03:00
tt-locktime317000-out.json Merge #11420: Bump univalue subtree and fix json formatting in tests 2020-01-12 17:01:40 -06:00
tx394b54bb.hex Merge bitcoin#9956: Reorganise qa directory (#2912) 2019-05-19 23:20:34 +03:00
txcreate1.hex Merge bitcoin#9956: Reorganise qa directory (#2912) 2019-05-19 23:20:34 +03:00
txcreate1.json Merge #11420: Bump univalue subtree and fix json formatting in tests 2020-01-12 17:01:40 -06:00
txcreate2.hex Merge bitcoin#9956: Reorganise qa directory (#2912) 2019-05-19 23:20:34 +03:00
txcreate2.json Add missing tx type to TxToUniv (#3069) 2019-08-28 10:54:44 +03:00
txcreatedata1.hex Merge bitcoin#9956: Reorganise qa directory (#2912) 2019-05-19 23:20:34 +03:00
txcreatedata1.json Merge #11420: Bump univalue subtree and fix json formatting in tests 2020-01-12 17:01:40 -06:00
txcreatedata2.hex Merge bitcoin#9956: Reorganise qa directory (#2912) 2019-05-19 23:20:34 +03:00
txcreatedata2.json Merge #11420: Bump univalue subtree and fix json formatting in tests 2020-01-12 17:01:40 -06:00
txcreatedata_seq0.hex Merge bitcoin#9956: Reorganise qa directory (#2912) 2019-05-19 23:20:34 +03:00
txcreatedata_seq0.json Add missing tx type to TxToUniv (#3069) 2019-08-28 10:54:44 +03:00
txcreatedata_seq1.hex Merge bitcoin#9956: Reorganise qa directory (#2912) 2019-05-19 23:20:34 +03:00
txcreatedata_seq1.json Merge #11420: Bump univalue subtree and fix json formatting in tests 2020-01-12 17:01:40 -06:00
txcreatemultisig1.hex Merge bitcoin#9956: Reorganise qa directory (#2912) 2019-05-19 23:20:34 +03:00
txcreatemultisig1.json Merge #11420: Bump univalue subtree and fix json formatting in tests 2020-01-12 17:01:40 -06:00
txcreatemultisig2.hex Merge bitcoin#9956: Reorganise qa directory (#2912) 2019-05-19 23:20:34 +03:00
txcreatemultisig2.json Add missing tx type to TxToUniv (#3069) 2019-08-28 10:54:44 +03:00
txcreateoutpubkey1.hex Merge bitcoin#9956: Reorganise qa directory (#2912) 2019-05-19 23:20:34 +03:00
txcreateoutpubkey1.json Add missing tx type to TxToUniv (#3069) 2019-08-28 10:54:44 +03:00
txcreatescript1.hex Merge bitcoin#9956: Reorganise qa directory (#2912) 2019-05-19 23:20:34 +03:00
txcreatescript1.json Add missing tx type to TxToUniv (#3069) 2019-08-28 10:54:44 +03:00
txcreatescript2.hex Merge bitcoin#9956: Reorganise qa directory (#2912) 2019-05-19 23:20:34 +03:00
txcreatescript2.json Add missing tx type to TxToUniv (#3069) 2019-08-28 10:54:44 +03:00
txcreatesignv1.hex Merge bitcoin#9956: Reorganise qa directory (#2912) 2019-05-19 23:20:34 +03:00
txcreatesignv1.json Add missing tx type to TxToUniv (#3069) 2019-08-28 10:54:44 +03:00
txcreatesignv2.hex Merge bitcoin#9956: Reorganise qa directory (#2912) 2019-05-19 23:20:34 +03:00