mirror of
https://github.com/dashpay/dash.git
synced 2024-12-25 12:02:48 +01:00
44c7301288
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 |
||
---|---|---|
.. | ||
bitcoin-util-test.json | ||
blanktxv1.hex | ||
blanktxv1.json | ||
blanktxv2.hex | ||
blanktxv2.json | ||
tt-delin1-out.hex | ||
tt-delin1-out.json | ||
tt-delout1-out.hex | ||
tt-delout1-out.json | ||
tt-locktime317000-out.hex | ||
tt-locktime317000-out.json | ||
tx394b54bb.hex | ||
txcreate1.hex | ||
txcreate1.json | ||
txcreate2.hex | ||
txcreate2.json | ||
txcreatedata1.hex | ||
txcreatedata1.json | ||
txcreatedata2.hex | ||
txcreatedata2.json | ||
txcreatedata_seq0.hex | ||
txcreatedata_seq0.json | ||
txcreatedata_seq1.hex | ||
txcreatedata_seq1.json | ||
txcreatemultisig1.hex | ||
txcreatemultisig1.json | ||
txcreatemultisig2.hex | ||
txcreatemultisig2.json | ||
txcreateoutpubkey1.hex | ||
txcreateoutpubkey1.json | ||
txcreatescript1.hex | ||
txcreatescript1.json | ||
txcreatescript2.hex | ||
txcreatescript2.json | ||
txcreatesignv1.hex | ||
txcreatesignv1.json | ||
txcreatesignv2.hex |