Skip to content

Backport of #809: fix crash in Descriptor::parse_desc #810

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Apr 29, 2025

Conversation

apoelstra
Copy link
Member

Backports #809 and does another patch release.

When parsing a descriptor with `Descriptor::parse_descriptor`, we first parse
as a string and then parse the keys. We fail to consider parsing errors
in the keys, resulting in a panic.

Also, clean up the panic message so it's clearer what's going on.
@apoelstra
Copy link
Member Author

Also present in 11.x and 10.x. 9.x and before are unaffected. I think I should do the two other backports, though I'll wait for an ACK on the main PR first.

@apoelstra
Copy link
Member Author

cc @sanket1729 can you review this? It may be easier to just read it independently of #810 since it's a smaller change to avoid any API changes.

Copy link
Member

@sanket1729 sanket1729 left a comment

Choose a reason for hiding this comment

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

ACK b83e787

@apoelstra apoelstra force-pushed the 2025-04--backport-809 branch from b83e787 to 212d78a Compare April 28, 2025 22:54
@apoelstra
Copy link
Member Author

Oops, I forgot to update the lockfiles on this one.

Copy link
Member

@sanket1729 sanket1729 left a comment

Choose a reason for hiding this comment

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

reACK 212d78a

Copy link
Member Author

@apoelstra apoelstra left a comment

Choose a reason for hiding this comment

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

On 212d78a successfully ran local tests

@apoelstra apoelstra merged commit ce9c50f into rust-bitcoin:release-12.x Apr 29, 2025
10 of 12 checks passed
@apoelstra apoelstra deleted the 2025-04--backport-809 branch April 29, 2025 13:28
@apoelstra
Copy link
Member Author

Tagged and published. I will do the other backports today.

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.

2 participants