Date: Mon, 31 Aug 2009 18:27:56 GMT From: Hans Petter Selasky <hselasky@FreeBSD.org> To: Perforce Change Reviews <perforce@FreeBSD.org> Subject: PERFORCE change 168019 for review Message-ID: <200908311827.n7VIRu9B028311@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=168019 Change 168019 by hselasky@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;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200908311827.n7VIRu9B028311>