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

don't return errors on too large requests on a reversed bitreader #58

Merged
merged 6 commits into from
May 30, 2024

Conversation

KillingSpark
Copy link
Owner

@KillingSpark KillingSpark commented Apr 1, 2024

Removing the checks for too large requests (> 56 bits) on a reversed bitreader allows for a whole bunch of error handling in hot loops to be removed which leads to better performance.

Doing this allows more weird values to float around requiring more careful handling of the returned values in many places, more fuzzing is definitely necessary.

@KillingSpark KillingSpark mentioned this pull request Apr 1, 2024
7 tasks
@KillingSpark
Copy link
Owner Author

KillingSpark commented May 3, 2024

This should include a change that checks the decoded FSE tables so that the symbols do match the allowed ranges for literal length, match length and offset which would avoid weird values appearing and would also detect corrupted files earlier and more consistently.

(And the code for creating these tables is currently very messy, a cleanup in this module would be nice anyways)

@KillingSpark KillingSpark mentioned this pull request May 28, 2024
@KillingSpark KillingSpark merged commit 944b391 into master May 30, 2024
4 checks passed
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