Skip to content

cat: panic when running with -T #7637

@karlmcdowall

Description

@karlmcdowall

The following fails...

$ /usr/bin/echo -en "\ta" | ./target/release/cat -T
thread 'main' panicked at src/uu/cat/src/cat.rs:546:17:
assertion `left == right` failed
  left: 97
 right: 10
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

Basically, if there is a \t in a buffer that does NOT contain a subsequent \n and you're running with the -T flag it'll crash.

Fix is up for review here

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions