rust-bitcoin-unsafe-fast/src
Andrew Poelstra 29549ccc73
Merge rust-bitcoin/rust-bitcoin#658: Check for overflow in Script::bytes_to_asm_fmt()
76cf74fa9b Added test for the overflow bug and few others (Martin Habovstiak)
a0e1d2e706 Check for overflow in Script::bytes_to_asm_fmt() (Martin Habovstiak)

Pull request description:

  This adds an overflow check in `Script::bytes_to_asm_fmt()` motivated by
  `electrs` issue. While it was not tested yet, I'm very confident that
  overflow is the cause of panic there and even if not it can cause panic
  becuase the public function takes unvalidated byte array and reads
  `data_len` from it.

  The `electrs` issue: https://github.com/romanz/electrs/issues/490

  ~~Strangely, this breaks a test case and I can't see why. I'm publishing in case someone wants to help.~~

  Edit: One damn character. :D Should be OK now.

ACKs for top commit:
  apoelstra:
    ACK 76cf74fa9b

Tree-SHA512: 4ffeca442a71b10c132f055f056128ae64e66cbdc1891662c3a4e743b82fa5d27075a44513e844be37888b33068eef3bbf6bcced5def70c17c9c5bd5b9d870cc
2021-09-20 14:22:44 +00:00
..
blockdata Merge rust-bitcoin/rust-bitcoin#658: Check for overflow in Script::bytes_to_asm_fmt() 2021-09-20 14:22:44 +00:00
consensus Merge rust-bitcoin/rust-bitcoin#628: Adds Taproot BIP341 signature message and create a unified sighash cache for legacy, segwit and taproot inputs 2021-09-15 17:47:17 +00:00
network Document cargo features 2021-09-14 12:24:57 +02:00
policy std -> core 2021-06-11 17:28:04 +02:00
util Merge pull request #655 from vss96/Limit-Script-Size 2021-09-16 10:42:08 +02:00
hash_types.rs std -> core 2021-06-11 17:28:04 +02:00
internal_macros.rs Document cargo features 2021-09-14 12:24:57 +02:00
lib.rs Document cargo features 2021-09-14 12:24:57 +02:00
serde_utils.rs no_std support 2021-07-15 09:04:49 +02:00
test_macros.rs Remove Decimal and replace strason with serde_json 2019-06-13 18:29:16 +01:00