Skip to content

fold: Using -b option crashes #7606

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

Open
karlmcdowall opened this issue Mar 29, 2025 · 0 comments · May be fixed by #7608
Open

fold: Using -b option crashes #7606

karlmcdowall opened this issue Mar 29, 2025 · 0 comments · May be fixed by #7608
Labels

Comments

@karlmcdowall
Copy link
Contributor

Running fold with the -b option crashes. It's quite easy to reproduce with any reasonably large file, E.g.

$ wget -O shakespeare.txt https://www.gutenberg.org/files/100/100-0.txt
$ ./target/release/fold -b ./shakespeare.txt
...
...
byte index 80 is not a char boundary; it is inside '”' (bytes 78..81) of `then—“Neighbour Quickly,” says he, “receive those that are civil, for,”
`
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

I'm planning to take a look at this issue.

@karlmcdowall karlmcdowall changed the title fold: Using -b fold: Using -b option crashes Mar 29, 2025
@cerdelen cerdelen linked a pull request Mar 29, 2025 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants