mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-11 14:38:29 +01:00
bitcoin-tx: Reject non-integral and out of range sequence ids
This commit is contained in:
@@ -41,7 +41,6 @@ export LC_ALL=C
|
||||
# independent ToIntegral<T>(...) or the ParseInt*() functions.
|
||||
# TODO: Reduce KNOWN_VIOLATIONS by replacing uses of locale dependent snprintf with strprintf.
|
||||
KNOWN_VIOLATIONS=(
|
||||
"src/bitcoin-tx.cpp.*stoul"
|
||||
"src/dbwrapper.cpp:.*vsnprintf"
|
||||
"src/rest.cpp:.*strtol"
|
||||
"src/test/dbwrapper_tests.cpp:.*snprintf"
|
||||
|
||||
@@ -515,6 +515,30 @@
|
||||
"output_cmp": "txcreatedata2.json",
|
||||
"description": "Creates a new transaction with one input, one address output and one data (zero value) output (output in json)"
|
||||
},
|
||||
{ "exec": "./bitcoin-tx",
|
||||
"args":
|
||||
["-create",
|
||||
"in=5897de6bd6027a475eadd57019d4e6872c396d0716c4875a5f1a6fcfdf385c1f:0:11aa"],
|
||||
"return_code": 1,
|
||||
"error_txt": "error: invalid TX sequence id '11aa'",
|
||||
"description": "Try to parse a sequence number outside the allowed range"
|
||||
},
|
||||
{ "exec": "./bitcoin-tx",
|
||||
"args":
|
||||
["-create",
|
||||
"in=5897de6bd6027a475eadd57019d4e6872c396d0716c4875a5f1a6fcfdf385c1f:0:-1"],
|
||||
"return_code": 1,
|
||||
"error_txt": "error: invalid TX sequence id '-1'",
|
||||
"description": "Try to parse a sequence number outside the allowed range"
|
||||
},
|
||||
{ "exec": "./bitcoin-tx",
|
||||
"args":
|
||||
["-create",
|
||||
"in=5897de6bd6027a475eadd57019d4e6872c396d0716c4875a5f1a6fcfdf385c1f:0:4294967296"],
|
||||
"return_code": 1,
|
||||
"error_txt": "error: invalid TX sequence id '4294967296'",
|
||||
"description": "Try to parse a sequence number outside the allowed range"
|
||||
},
|
||||
{ "exec": "./bitcoin-tx",
|
||||
"args":
|
||||
["-create",
|
||||
|
||||
Reference in New Issue
Block a user