PERFORCE change 168019 for review
Hans Petter Selasky
hselasky at FreeBSD.org
Mon Aug 31 18:27:57 UTC 2009
http://perforce.freebsd.org/chv.cgi?CH=168019
Change 168019 by hselasky at hselasky_laptop001 on 2009/08/31 18:27:32
USB CORE:
- Fix NULL-pointer dereference in usb_endpoint_foreach().
The function in question is currently not used anywhere.
- Report and patch from: Patroklos Argyroudis at census, inc
PR: usb/138389
Affected files ...
.. //depot/projects/usb/src/sys/dev/usb/usb_device.c#52 edit
Differences ...
==== //depot/projects/usb/src/sys/dev/usb/usb_device.c#52 (text+ko) ====
@@ -367,12 +367,14 @@
struct usb_endpoint *
usb_endpoint_foreach(struct usb_device *udev, struct usb_endpoint *ep)
{
- struct usb_endpoint *ep_end = udev->endpoints + udev->endpoints_max;
+ struct usb_endpoint *ep_end;
/* be NULL safe */
if (udev == NULL)
return (NULL);
+ ep_end = udev->endpoints + udev->endpoints_max;
+
/* get next endpoint */
if (ep == NULL)
ep = udev->endpoints;
More information about the p4-projects
mailing list