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

panicked calling Option::unwrap() on a None value with self.error_if_invalid_data.take().unwrap() #13

Open
catenacyber opened this issue Apr 5, 2021 · 0 comments

Comments

@catenacyber
Copy link
Contributor

@danielrh
We have been using this crate with Suricata.
And Fuzzing Suricata found a way to panic with a (mis)-use of its API.
After a first failure, a try to decompress more data results in

thread '<unnamed>' panicked at 'called `Option::unwrap()` on a `None` value', ~/.cargo/registry/src/github.com-1ecc6299db9ec823/brotli-decompressor-2.3.1/src/reader.rs:316:58

This is getting fixed in Suricata by not trying to decompress more data cf OISF/suricata#6025
But you may want to produce a more friendly error than just panic...

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

No branches or pull requests

1 participant