mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-04-04 04:45:10 +02:00
Merge bitcoin/bitcoin#23227: bitcoin-tx: Avoid treating integer overflow as OP_0
fa43e7c2d9bitcoin-tx: Avoid treating overflow as OP_0 (MarcoFalke)fa053c0019style: Fix whitespace in Parse* functions (MarcoFalke)fa03dec7e9refactor: Use C++11 range based for loop in ParseScript (MarcoFalke)fad55e79cadoc: Fixup ToIntegral docs (MarcoFalke) Pull request description: Seems odd to treat integer overflow as `OP_0`, so fix that. ACKs for top commit: theStack: re-ACKfa43e7c2d9shaavan: ACKfa43e7c2d9Tree-SHA512: 1bbe2de62d853badc18d57d169c6e78ddcdff037e5a85357995dead11c8e67a4fe35087e08a181c60753f8ce91058b7fcc06f5b7901afedc78fbacea8bc3ef4f
This commit is contained in:
@@ -38,7 +38,7 @@ export LC_ALL=C
|
||||
# https://stackoverflow.com/a/34878283 for more details.
|
||||
|
||||
# TODO: Reduce KNOWN_VIOLATIONS by replacing uses of locale dependent stoul/strtol with locale
|
||||
# independent ToIntegral<T>(...).
|
||||
# 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"
|
||||
|
||||
@@ -294,6 +294,12 @@
|
||||
"output_cmp": "txcreatescript4.json",
|
||||
"description": "Create a new transaction with a single output script (OP_DROP) in a P2SH, wrapped in a P2SH (output as json)"
|
||||
},
|
||||
{ "exec": "./bitcoin-tx",
|
||||
"args": ["-create", "outscript=0:999999999999999999999999999999"],
|
||||
"return_code": 1,
|
||||
"error_txt": "error: script parse error: decimal numeric value only allowed in the range -0xFFFFFFFF...0xFFFFFFFF",
|
||||
"description": "Try to parse an output script with a decimal number above the allowed range"
|
||||
},
|
||||
{ "exec": "./bitcoin-tx",
|
||||
"args": ["-create", "outscript=0:9999999999"],
|
||||
"return_code": 1,
|
||||
|
||||
Reference in New Issue
Block a user