Skip to content

Fix descriptor parser handling of malformed inputs - #862

Open
Sjors wants to merge 4 commits into
bitcoin-core:masterfrom
Sjors:2026/10/descriptor-input-validation
Open

Sjors wants to merge 4 commits into
bitcoin-core:masterfrom
Sjors:2026/10/descriptor-input-validation

Conversation

@Sjors

@Sjors Sjors commented Oct 24, 2026

Copy link
Copy Markdown
Member

Split from #852 since they're not strictly needed. Feel free to close if you think it's not worth fixing.

Reject malformed ranged derivation suffixes, empty key expressions and trailing commas in key lists. Report truncated Taproot trees with ValueError instead of IndexError.

Sjors added 4 commits October 24, 2026 05:26
Cover a multisig key list with a trailing comma, which previously dropped
the empty final entry.
Add a regression for a taproot tree missing its closing brace. Report the
missing delimiter with ValueError rather than leaking an IndexError.
Add regression coverage for /0*, which previously lost the zero and was
silently treated as a bare range marker.
Cover an empty entry inside a multisig key list and raise ValueError
instead of indexing an empty string.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant