Do not pass uninitialized data buffer to devctl_queue_data function.

This was botched in revision 190191.
This commit is contained in:
Alexander Kabaev 2009-03-23 01:24:17 +00:00
parent 9999864a87
commit 62a5f39429

View File

@ -2265,35 +2265,34 @@ usb2_notify_addq(const char *type, struct usb2_device *udev)
return;
/* String it all together. */
if (udev->parent_hub) {
snprintf(data, 1024,
"%s"
"%s "
"vendor=0x%04x "
"product=0x%04x "
"devclass=0x%02x "
"devsubclass=0x%02x "
"sernum=\"%s\" "
"at "
"port=%u "
"on "
"%s\n",
type,
udev->ugen_name,
UGETW(udev->ddesc.idVendor),
UGETW(udev->ddesc.idProduct),
udev->ddesc.bDeviceClass,
udev->ddesc.bDeviceSubClass,
snprintf(data, 1024,
"%s"
"%s "
"vendor=0x%04x "
"product=0x%04x "
"devclass=0x%02x "
"devsubclass=0x%02x "
"sernum=\"%s\" "
"at "
"port=%u "
"on "
"%s\n",
type,
udev->ugen_name,
UGETW(udev->ddesc.idVendor),
UGETW(udev->ddesc.idProduct),
udev->ddesc.bDeviceClass,
udev->ddesc.bDeviceSubClass,
#if USB_HAVE_STRINGS
udev->serial,
udev->serial,
#else
"",
"",
#endif
udev->port_no,
udev->parent_hub != NULL ?
udev->parent_hub->ugen_name :
device_get_nameunit(device_get_parent(udev->bus->bdev)));
}
udev->port_no,
udev->parent_hub != NULL ?
udev->parent_hub->ugen_name :
device_get_nameunit(device_get_parent(udev->bus->bdev)));
devctl_queue_data(data);
}