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

return err in read_compressed instead of panicking #9

Merged
merged 1 commit into from
Dec 16, 2020
Merged

return err in read_compressed instead of panicking #9

merged 1 commit into from
Dec 16, 2020

Conversation

dgunay
Copy link
Contributor

@dgunay dgunay commented Dec 16, 2020

Attempting to address #4

At first I attempted to reconstruct a panicking input, but it was a lot of trouble so I just ended up returning the Err instead of unwrapping. The panic would only have happened if the actual uncompressed size does not match the indicated uncompressed size. I'm unfamiliar with zlib and brs so if it is more complicated than this please let me know.

@qoh
Copy link
Contributor

qoh commented Dec 16, 2020

There are several others, most due to EOF in BitReader. It'll be a slightly larger effort to safely handle it all, especially as I might be replacing the BitReader implementation, but that can't really start until the 0.3 changes are more done. This one still counts though, thanks.

@qoh qoh merged commit 166ef96 into brickadia:master Dec 16, 2020
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