tsu icon indicating copy to clipboard operation
tsu copied to clipboard

CRLF: Binary Data Corruption

Open alemariusnexus opened this issue 3 years ago • 0 comments

I was testing the sudo provided by tsu (latest master), when I noticed that it seems to corrupt certain kinds of binary data.

Running the following:

$ sudo echo -ne "\n" | hexdump

I get this output:

0000000 0a0d 0000002

Only a single byte (LF, 0x0a) should be output, but it seems like tsu converts LF to CRLF, so there's an additional byte. This kind of conversion usually happens when data is read/written in text mode instead of binary mode, so maybe there's a wrong setting in the script somewhere?

alemariusnexus avatar Mar 24 '21 16:03 alemariusnexus