Skip to content

BIP-346: correct TxFieldSelector index upper bound#2093

Open
yyhrnk wants to merge 1 commit intobitcoin:masterfrom
yyhrnk:fix/txfs-index-bounds
Open

BIP-346: correct TxFieldSelector index upper bound#2093
yyhrnk wants to merge 1 commit intobitcoin:masterfrom
yyhrnk:fix/txfs-index-bounds

Conversation

@yyhrnk
Copy link
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
Member

cc: @stevenroose

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Pending acceptance This BIP modification requires sign-off by the champion of the BIP being modified Typo-to-be-collected

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants