Bug#567041: vim-common: xxd -r -p data loss
    Nikolai Kondrashov 
    spbnick at gmail.com
       
    Tue Jan 26 21:15:11 UTC 2010
    
    
  
Package: vim-common
Version: 2:7.2.284-1
Severity: grave
Justification: causes non-serious data loss
The attached input file (logitech_precision_gamepad_hidrd.txt) is
interpreted by xxd -r -p incorrectly. In effect, not according to manual,
which states:
    Use the combination -r -p to read plain hexadecimal dumps without line
    number information and without a particular column layout. Additional
    Whitespace and line-breaks are allowed anywhere.
The following command:
cat logitech_precision_gamepad_hidrd.txt | xxd -r -p | hexdump -C
results in the following output:
00000000  05 01 09 04 a1 01 a1 02  75 08 95 02 15 00 26 ff  |........u.....&.|
00000010  25 01 45 01 05 09 19 01  29 0a 81 02 06 00 ff 75  |%.E.....)......u|
00000020
which is incorrect.
While the following command:
cat logitech_precision_gamepad_hidrd.txt | tr -d ' \n' | xxd -r -p | hexdump -C
results in the correct output:
00000000  05 01 09 04 a1 01 a1 02  75 08 95 02 15 00 26 ff  |........u.....&.|
00000010  00 35 00 46 ff 00 09 30  09 31 81 02 75 01 95 0a  |.5.F...0.1..u...|
00000020  25 01 45 01 05 09 19 01  29 0a 81 02 06 00 ff 75  |%.E.....)......u|
00000030  01 95 06 25 01 45 01 09  01 81 02 c0 c0           |...%.E.......|
0000003d
-- System Information:
Debian Release: squeeze/sid
  APT prefers testing
  APT policy: (500, 'testing')
Architecture: i386 (i686)
Kernel: Linux 2.6.32-trunk-686 (SMP w/2 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Versions of packages vim-common depends on:
ii  libc6                         2.10.2-2   GNU C Library: Shared libraries
Versions of packages vim-common recommends:
ii  vim                          2:7.2.284-1 Vi IMproved - enhanced vi editor
ii  vim-tiny                     2:7.2.284-1 Vi IMproved - enhanced vi editor -
vim-common suggests no packages.
-- no debconf information
-------------- next part --------------
 05 01 09 04 A1 01 A1 02 75 08 95 02 15 00 26 FF
 00 35 00 46 FF 00 09 30 09 31 81 02 75 01 95 0A
 25 01 45 01 05 09 19 01 29 0A 81 02 06 00 FF 75
 01 95 06 25 01 45 01 09 01 81 02 C0 C0
    
    
More information about the pkg-vim-maintainers
mailing list