Skip to content
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

[audit] Avoid a panic in case we try decoding naff DryRunResult bytes #1444

Merged
merged 1 commit into from
Feb 24, 2024

Conversation

jsdw
Copy link
Collaborator

@jsdw jsdw commented Feb 23, 2024

No description provided.

@jsdw jsdw requested a review from a team as a code owner February 23, 2024 15:46
@@ -535,6 +535,13 @@ impl DryRunResultBytes {
// dryRun returns an ApplyExtrinsicResult, which is basically a
// `Result<Result<(), DispatchError>, TransactionValidityError>`.
let bytes = self.0;

// We expect at least 2 bytes. In case we got a naff response back (or
Copy link
Member

Choose a reason for hiding this comment

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

naff response back?

some cool british expression? :)

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

:D Yup, cool, exactly! "dodgy" or "malformed" are also applicable!

@niklasad1 niklasad1 merged commit 70d56dc into master Feb 24, 2024
13 checks passed
@niklasad1 niklasad1 deleted the jsdw-sec-1 branch February 24, 2024 10:48
@jsdw jsdw mentioned this pull request Mar 21, 2024
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.

3 participants