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

Panic when searching binary file as utf-16le #1089

Closed
comex opened this issue Oct 22, 2018 · 1 comment
Closed

Panic when searching binary file as utf-16le #1089

comex opened this issue Oct 22, 2018 · 1 comment
Labels
bug A bug.

Comments

@comex
Copy link

comex commented Oct 22, 2018

Seems similar to #1052, but I'm encountering this on current ripgrep trunk (acf226c).

With the following file: https://a.qoid.us/System.Collections.dll

Running rg -E utf-16le a System.Collections.dll produces:

thread 'main' panicked at 'index out of bounds: the len is 2 but the index is 2', /Users/comex/.cargo/registry/src/gh.neting.cc-1ecc6299db9ec823/encoding_rs-0.8.6/src/handles.rs:311:21
note: Run with `RUST_BACKTRACE=1` for a backtrace.
@BurntSushi
Copy link
Owner

Thanks! This was indeed occurring on master. It looks like bumping to the latest release of encoding_rs fixes this.

@BurntSushi BurntSushi added the bug A bug. label Oct 22, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug A bug.
Projects
None yet
Development

No branches or pull requests

2 participants