[cups.bugs] [MOD] STR #3858: "usb" segfaults id device does not send usable ID string, for example with USB-to-Parallel adapters

Till Kamppeter till.kamppeter at gmail.com
Tue Jun 7 12:24:01 PDT 2011


DO NOT REPLY TO THIS MESSAGE.  INSTEAD, POST ANY RESPONSES TO THE LINK BELOW.

[STR New]

The problem is that the USB CUPS backend crashes with a segmentation fault
if the device does not send a device ID or sends an unusable device ID.
This happens very often with USB-to-Parallel adapter cables. See the
following Ubuntu bug reports:

https://bugs.launchpad.net/bugs/468701
https://bugs.launchpad.net/bugs/564917

The attached patch (which we use in Ubuntu already for a longer time with
success) assures that the device ID string read from a USB device can
never be a mess: It tries the other byte order for the device ID string
length also if the length is too small, empties the read device ID string
if there is an IOCTL failure, rejects ID strings with unprintable
characters, cleans white space in the ID string, and finally accepts the
empty ID string as an unknown device.

This overcomes the problem that USB-to-Parallel adapter cables do not
report back a usable ID string. With these changes it is at least possible
to use one adapter cable per computer if the cables do not report unique
serial numbers via libusb and any number of adapter cables if they do
report serial numbers via libusb. Real USB printers can always be used,
also if there are other printers connected with an adapter cable.

Link: http://www.cups.org/str.php?L3858
Version: 1.5b2
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: usb-backend-no-segfault-on-bad-device-id.patch
URL: <https://lists.cups.org/pipermail/cups/attachments/20110607/d71537c9/attachment.ksh>


More information about the cups mailing list