Backport of #809: fix crash in Descriptor::parse_desc#810
Merged
apoelstra merged 3 commits intorust-bitcoin:release-12.xfrom Apr 29, 2025
Merged
Backport of #809: fix crash in Descriptor::parse_desc#810apoelstra merged 3 commits intorust-bitcoin:release-12.xfrom
Descriptor::parse_desc#810apoelstra merged 3 commits intorust-bitcoin:release-12.xfrom
Conversation
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.
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. |
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. |
b83e787 to
212d78a
Compare
Member
Author
|
Oops, I forgot to update the lockfiles on this one. |
Member
Author
|
Tagged and published. I will do the other backports today. |
Merged
apoelstra
added a commit
that referenced
this pull request
May 3, 2025
06400b1 bump patch version of 10.2 (Andrew Poelstra) 1fed0ec add regression test for #806 (Andrew Poelstra) 2f21e23 descriptor: fix key parsing error handling in parse_desc (Andrew Poelstra) 0e40319 ci: update CI job to run all the fuzz tests (Andrew Poelstra) 6ff58af lib: remove some deny lints (Andrew Poelstra) Pull request description: Backports #809 to 10.x. This is a direct rebase of #810 except that I added a commit with some lint fixes. (I had been avoiding this, but we've been having a lot of backports lately so I think I ought to just address it.) After this I will do 11.x. ACKs for top commit: sanket1729: utACK 06400b1 Tree-SHA512: 6a30480becf20aa64e1f4528cf0d1df75bd2ddbaad95ae6bd4a3f5885624a791c7d7a77020b27675c348b2ff95467e0cb8bb42ca2c58112d7322f75480608dca
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Backports #809 and does another patch release.