Date: Mon, 23 Mar 2009 01:24:17 +0000 (UTC) From: Alexander Kabaev <kan@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r190306 - head/sys/dev/usb Message-ID: <200903230124.n2N1OHpo090145@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: kan Date: Mon Mar 23 01:24:17 2009 New Revision: 190306 URL: http://svn.freebsd.org/changeset/base/190306 Log: Do not pass uninitialized data buffer to devctl_queue_data function. This was botched in revision 190191. Modified: head/sys/dev/usb/usb_device.c Modified: head/sys/dev/usb/usb_device.c ============================================================================== --- head/sys/dev/usb/usb_device.c Mon Mar 23 01:13:34 2009 (r190305) +++ head/sys/dev/usb/usb_device.c Mon Mar 23 01:24:17 2009 (r190306) @@ -2265,35 +2265,34 @@ usb2_notify_addq(const char *type, struc 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); }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200903230124.n2N1OHpo090145>