Skip to content

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

@catenacyber

Description

@catenacyber

@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...

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions