The following reply was made to PR usb/138389; it has been noted by GNATS.

From: [email protected] (dfilter service)
To: [email protected]
Cc:  
Subject: Re: usb/138389: commit references a PR
Date: Mon, 28 Sep 2009 07:40:07 +0000 (UTC)

 Author: thompsa
 Date: Mon Sep 28 07:39:51 2009
 New Revision: 197558
 URL: http://svn.freebsd.org/changeset/base/197558
 
 Log:
   Fix NULL-pointer dereference in usb_endpoint_foreach().
   
   PR:          usb/138389
   Submitted by:        Patroklos Argyroudis at census, inc
 
 Modified:
   head/sys/dev/usb/usb_device.c
 
 Modified: head/sys/dev/usb/usb_device.c
 ==============================================================================
 --- head/sys/dev/usb/usb_device.c      Mon Sep 28 07:32:11 2009        
(r197557)
 +++ head/sys/dev/usb/usb_device.c      Mon Sep 28 07:39:51 2009        
(r197558)
 @@ -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;
 _______________________________________________
 [email protected] mailing list
 http://lists.freebsd.org/mailman/listinfo/svn-src-all
 To unsubscribe, send any mail to "[email protected]"
 
_______________________________________________
[email protected] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-usb
To unsubscribe, send any mail to "[email protected]"

Reply via email to