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

Fix possible crash found by fuzzer #8

Merged
merged 1 commit into from
May 1, 2024

Conversation

micahsnyder
Copy link
Contributor

The skip value is read from untrusted input and needs to be verified.

This fix checks that skip + 3 will not exceed num_codes, since we can't get a slice for code_lengths[5..4].

Fixes #7

The `skip` value is read from untrusted input and needs to be verified.

This fix checks that `skip + 3` will not exceed `num_codes`, since  we
can't get a slice for `code_lengths[5..4]`.

Fixes royaltm#7
@royaltm
Copy link
Owner

royaltm commented May 1, 2024

Thanks!

I suppose we don't have a test case binary?

@royaltm royaltm merged commit 77dc54b into royaltm:master May 1, 2024
5 checks passed
@micahsnyder
Copy link
Contributor Author

Thanks!

I suppose we don't have a test case binary?

Thanks for looking at this so quickly. Yes, it's attached to #7. I think you found it after writing this.

@micahsnyder micahsnyder deleted the issue-7-fix-crash branch May 6, 2024 18:20
@royaltm
Copy link
Owner

royaltm commented May 6, 2024

yes I did, thanks for the reply anyway!

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.

Possible crash found by fuzzing
2 participants