Anonymous | Login | Signup for a new account | 11-10-2008 11:02 PST |
Main | My View | View Issues | Change Log | Docs |
Viewing Issue Simple Details [ Jump to Notes ] | [ View Advanced ] [ Issue History ] [ Print ] | ||||||||
ID | Category | Severity | Reproducibility | Date Submitted | Last Update | ||||
0000874 | [BusyBox] Other | trivial | always | 05-18-06 10:30 | 06-28-06 07:37 | ||||
Reporter | bengardner | View Status | public | ||||||
Assigned To | BusyBox | ||||||||
Priority | normal | Resolution | fixed | ||||||
Status | closed | Product Version | 1.1.x | ||||||
Summary | 0000874: Incorrect output spacing using "hexdump -C" | ||||||||
Description |
Using "hexdump -C", the output of a 20-byte file looks like this: 00000000 61 62 63 64 65 66 67 68 69 6a 6b 6c 6d 6e 6f 70 |abcdefghijklmnop| 00000010 71 72 73 74 |qrst| 00000014 (note the extra 2 spaces before the ascii output) And a 26-byte file looks like this: 00000000 61 62 63 64 65 66 67 68 69 6a 6b 6c 6d 6e 6f 70 |abcdefghijklmnop| 00000010 71 72 73 74 75 76 77 79 78 7a |qrstuvwyxz| 0000001a (note the extra space before the ascii output) The problem is that bpad() in dump.c shortens the length of the format string (from "%02x " to "%2s "), but does not update the nospace pointer, so the last byte in the 8-byte set is printed as 3 spaces instead of 2 spaces. A simple fix is to decrease the nospace pointer by the number of characters removed. A patch that does this is attached. |
||||||||
Additional Information | |||||||||
Attached Files | libbb-dump-bpad-nospace.diff.txt [^] (639 bytes) 05-18-06 10:30 | ||||||||
|
Copyright © 2000 - 2006 Mantis Group |