Skip to content

BIP-346: correct TxFieldSelector index upper bound#2093

Merged
jonatack merged 1 commit into
bitcoin:masterfrom
yyhrnk:fix/txfs-index-bounds
May 28, 2026
Merged

BIP-346: correct TxFieldSelector index upper bound#2093
jonatack merged 1 commit into
bitcoin:masterfrom
yyhrnk:fix/txfs-index-bounds

Conversation

@yyhrnk
Copy link
Copy Markdown
Contributor

@yyhrnk yyhrnk commented Feb 2, 2026

Previously parse_inout_selection only rejected indices strictly greater than nb_items, allowing idx == nb_items to pass through and later cause a panic when indexing transaction inputs/outputs.

Tightened the bounds check in parse_inout_selection to treat idx >= nb_items as out of bounds, enforcing the intended 0..nb_items-1 index range for TxFieldSelector individual mode.

@murchandamus murchandamus added Typo-to-be-collected Pending acceptance This BIP modification requires sign-off by the champion of the BIP being modified labels Feb 3, 2026
@murchandamus
Copy link
Copy Markdown
Member

cc: @stevenroose

@jonatack jonatack added Fixups Minor, clearly correct fixups that don't require BIP author review and removed Pending acceptance This BIP modification requires sign-off by the champion of the BIP being modified Typo-to-be-collected labels May 28, 2026
Copy link
Copy Markdown
Member

@jonatack jonatack left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACK e3c4ded

@jonatack jonatack merged commit 7f9434c into bitcoin:master May 28, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Fixups Minor, clearly correct fixups that don't require BIP author review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants