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

Closed
aidanhs opened this issue Mar 28, 2022 · 0 comments
Closed

Crash when compressing file with -q0 #72

aidanhs opened this issue Mar 28, 2022 · 0 comments

Comments

@aidanhs
Copy link

aidanhs commented Mar 28, 2022

breaks-brotli.gz

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/compress_fragment.rs:939:29
stack backtrace:
   0: rust_begin_unwind
             at /rustc/399ba6bb377ce02224b57c4d6e127e160fa76b34/library/std/src/panicking.rs:498:5
   1: core::panicking::panic_fmt
             at /rustc/399ba6bb377ce02224b57c4d6e127e160fa76b34/library/core/src/panicking.rs:107:14
   2: core::slice::index::slice_start_index_len_fail
             at /rustc/399ba6bb377ce02224b57c4d6e127e160fa76b34/library/core/src/slice/index.rs:35:5
   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
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant