segfault with -t switch
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
usbutils (Ubuntu) |
New
|
Undecided
|
Unassigned |
Bug Description
Binary package hint: usbutils
when I connect my mobile phone to usb lsusb starts to segfault with -t switch.
I tried to debug it down to the source code and found following:
when I: "cat /sys/bus/
it responds with empty line. lsusb is reading this "" value and incorrectly process it in lsusb-t.c:245.
while(r) is true (r=-1 in such case) and It keeps replacing "\n" beyond the bottom limit of the buffer.
When it accidentally hit a "\n" to replace it tries to rewrite it and causes segmentation fault.
Description: Ubuntu 10.04 LTS
Release: 10.04
lsusb (usbutils) 0.86
Linux nexus 2.6.32-22-generic #36-Ubuntu SMP Thu Jun 3 19:31:57 UTC 2010 x86_64 GNU/Linux