coreutils icon indicating copy to clipboard operation
coreutils copied to clipboard

dd: incorrect seek on oseek=1Bx2x4

Open jfinkels opened this issue 1 year ago • 0 comments

Coreutils dd v9.4.113-c01ee:

$ echo abcdefghijklm | ../gnu/src/dd oseek=1Bx2x4 bs=5 > out 2> /dev/null && cat out
^@^@^@^@^@^@^@^@abcdefghijklm

(The ^@ are null bytes.)

On uutils dd:

$ echo abcdefghijklm | ./target/debug/dd oseek=1Bx2x4 bs=5 > out 2> /dev/null && cat out
^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@abcdefghijklm

This is from the GNU test suite file tests/dd/bytes.sh.

jfinkels avatar Jan 28 '24 19:01 jfinkels