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

Crash when compressing file with -q0 #72

aidanhs opened this issue Mar 28, 2022 · 0 comments

Crash when compressing file with -q0 #72

aidanhs opened this issue Mar 28, 2022 · 0 comments


Copy link

aidanhs commented Mar 28, 2022


Download the attached file then do

$ gunzip breaks-brotli.gz
$ RUST_BACKTRACE=1 cargo run --release --bin brotli -- -c -q0 breaks-brotli compressed
    Finished release [optimized] target(s) in 0.06s
     Running `target/release/brotli -c -q0 breaks-brotli compressed`
thread 'main' panicked at 'range start index 89173 out of range for slice of length 65536', /home/aidanhs/work/rust-brotli/src/enc/
stack backtrace:
   0: rust_begin_unwind
             at /rustc/399ba6bb377ce02224b57c4d6e127e160fa76b34/library/std/src/
   1: core::panicking::panic_fmt
             at /rustc/399ba6bb377ce02224b57c4d6e127e160fa76b34/library/core/src/
   2: core::slice::index::slice_start_index_len_fail
             at /rustc/399ba6bb377ce02224b57c4d6e127e160fa76b34/library/core/src/slice/
   3: brotli::enc::compress_fragment::BrotliCompressFragmentFast
   4: brotli::enc::encode::BrotliEncoderCompressStreamFast
   5: brotli::main
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
None yet

No branches or pull requests

1 participant