diff options
author | Wladimir J. van der Laan <laanwj@protonmail.com> | 2020-03-27 08:02:46 +0100 |
---|---|---|
committer | Wladimir J. van der Laan <laanwj@protonmail.com> | 2020-03-27 08:02:51 +0100 |
commit | b53af72b8276e8a23915d38fe459889cccb56f50 (patch) | |
tree | 4b6f7c1984b763a1764fba5a0855ce5bb3e4d2c5 /src/test/data/tx_invalid.json | |
parent | 54646167db5ec86e1f532b6dcf8a1713ea026b6b (diff) | |
parent | 9ab14e4d21c73d16d8d782f1576fe29e659e2a70 (diff) |
Merge #18416: util: Limit decimal range of numbers ParseScript accepts
9ab14e4d21c73d16d8d782f1576fe29e659e2a70 Limit decimal range of numbers ParseScript accepts (pierrenn)
Pull request description:
Following up on this suggestion : https://github.com/bitcoin/bitcoin/pull/18413#issuecomment-602966490, prevent the output of `atoi64` in the `core_read.cpp:ParseScript` helper to send to `CScriptNum::serialize` values wider than 32-bit.
Since the `ParseScript` helper is only used by the tool defined in `bitcoin-tx.cpp`, this only prevents users to provide too much unrealistic values.
ACKs for top commit:
laanwj:
ACK 9ab14e4d21c73d16d8d782f1576fe29e659e2a70
Tree-SHA512: ee228269d19d04e8fee0aa7c0ae2bb0a2b437b8e574356e8d9b2279318242057d51fcf39a842aa3afe27408d0f2d5276df245d07a3f4828644a366f80587b666
Diffstat (limited to 'src/test/data/tx_invalid.json')
-rw-r--r-- | src/test/data/tx_invalid.json | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/test/data/tx_invalid.json b/src/test/data/tx_invalid.json index d22175d660..3b1db449b2 100644 --- a/src/test/data/tx_invalid.json +++ b/src/test/data/tx_invalid.json @@ -174,7 +174,7 @@ "0100000001000100000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000ff64cd1d", "P2SH,CHECKLOCKTIMEVERIFY"], ["Argument 2^32 with nLockTime=2^32-1"], -[[["0000000000000000000000000000000000000000000000000000000000000100", 0, "4294967296 CHECKLOCKTIMEVERIFY 1"]], +[[["0000000000000000000000000000000000000000000000000000000000000100", 0, "0x050000000001 CHECKLOCKTIMEVERIFY 1"]], "0100000001000100000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000ffffffff", "P2SH,CHECKLOCKTIMEVERIFY"], ["Same, but with nLockTime=2^31-1"], |