dropbox / dropbox/rust-brotli-decompressor

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

Open
#13 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Rust
Stars
61
Forks
30
Avg merge
2d 11h
Merged PRs (30d)
10

Description

@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 '' 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 https://github.com/OISF/suricata/pull/6025
But you may want to produce a more friendly error than just panic...

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.