[Bug 13881] New: xxd -p -r fails with input longer than 30 bytes
bugzilla at busybox.net
bugzilla at busybox.net
Tue Jun 29 14:50:08 UTC 2021
https://bugs.busybox.net/show_bug.cgi?id=13881
Bug ID: 13881
Summary: xxd -p -r fails with input longer than 30 bytes
Product: Busybox
Version: unspecified
Hardware: All
OS: Linux
Status: NEW
Severity: normal
Priority: P5
Component: Other
Assignee: unassigned at busybox.net
Reporter: hudson at trmm.net
CC: busybox-cvs at busybox.net
Target Milestone: ---
version: 21fbee2e87ddf7b47bb501b6529b63ac2b3af0bd (git checkout 2021-06-29)
xxd -p -r discards input longer than 30 bytes when the characters are all on
one line:
% echo "000102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f" \
| ./busybox xxd -p -r | xxd -g1
00000000: 00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f ................
00000010: 10 11 12 13 14 15 16 17 18 19 1a 1b 1c 1d ..............
% echo "000102030405060708090a0b0c0d0e0f 101112131415161718191a1b1c1d1e1f" \
| ./busybox xxd -p -r | xxd -g1
00000000: 00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f ................
00000010: 10 11 12 13 14 15 16 17 18 19 1a 1b 1c 1d ..............
Splitting the values onto separate lines works:
% echo "000102030405060708090a0b0c0d0e0f
101112131415161718191a1b1c1d1e1f" \
| ./busybox xxd -p -r | xxd -g1
00000000: 00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f ................
00000010: 10 11 12 13 14 15 16 17 18 19 1a 1b 1c 1d 1e 1f ................
Using the system xxd produces the expected result regardless of whitespace:
% echo "000102030405060708090a0b0c0d0e0f101112131415161718191a1b1c1d1e1f" \
| /usr/bin/xxd -p -r | xxd -g1
00000000: 00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f ................
00000010: 10 11 12 13 14 15 16 17 18 19 1a 1b 1c 1d 1e 1f ................
--
You are receiving this mail because:
You are on the CC list for the bug.
More information about the busybox-cvs
mailing list