From owner-freebsd-usb@FreeBSD.ORG Thu Oct 29 23:20:10 2009 Return-Path: Delivered-To: freebsd-usb@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 95EE410656B0 for ; Thu, 29 Oct 2009 23:20:10 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 848668FC1D for ; Thu, 29 Oct 2009 23:20:10 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.3/8.14.3) with ESMTP id n9TNKAQC025574 for ; Thu, 29 Oct 2009 23:20:10 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.3/8.14.3/Submit) id n9TNKAJj025565; Thu, 29 Oct 2009 23:20:10 GMT (envelope-from gnats) Date: Thu, 29 Oct 2009 23:20:10 GMT Message-Id: <200910292320.n9TNKAJj025565@freefall.freebsd.org> To: freebsd-usb@FreeBSD.org From: dfilter@FreeBSD.ORG (dfilter service) Cc: Subject: Re: usb/138389: commit references a PR X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: dfilter service List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Oct 2009 23:20:10 -0000 The following reply was made to PR usb/138389; it has been noted by GNATS. From: dfilter@FreeBSD.ORG (dfilter service) To: bug-followup@FreeBSD.org Cc: Subject: Re: usb/138389: commit references a PR Date: Thu, 29 Oct 2009 23:17:32 +0000 (UTC) Author: thompsa Date: Thu Oct 29 23:17:23 2009 New Revision: 198644 URL: http://svn.freebsd.org/changeset/base/198644 Log: MFC r197558 Fix NULL-pointer dereference in usb_endpoint_foreach(). PR: usb/138389 Modified: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/usb/usb_device.c stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/dev/usb/usb_device.c ============================================================================== --- stable/8/sys/dev/usb/usb_device.c Thu Oct 29 23:16:39 2009 (r198643) +++ stable/8/sys/dev/usb/usb_device.c Thu Oct 29 23:17:23 2009 (r198644) @@ -367,12 +367,14 @@ usb_init_endpoint(struct usb_device *ude 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; _______________________________________________ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org"