aboutsummaryrefslogtreecommitdiff
path: root/test/functional/rpc_txoutproof.py
diff options
context:
space:
mode:
authorWladimir J. van der Laan <laanwj@gmail.com>2018-07-09 19:56:59 +0200
committerWladimir J. van der Laan <laanwj@gmail.com>2018-07-09 20:08:15 +0200
commit453ae5ec9f7694777e17aab5deeeed69e4263b88 (patch)
treef08bf6c48c64199f4b38ec7d07761503fffe348b /test/functional/rpc_txoutproof.py
parenta6d14b1cf71163e438cc6b9b9b1a65037ab49264 (diff)
parent57889e688dd0987a1e087cd48d216a413127601e (diff)
downloadbitcoin-453ae5ec9f7694777e17aab5deeeed69e4263b88.tar.xz
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
Diffstat (limited to 'test/functional/rpc_txoutproof.py')
0 files changed, 0 insertions, 0 deletions