On Fri, 5 Sep 2003, Greg KH wrote: > On Fri, Sep 05, 2003 at 10:06:15AM -0400, Alan Stern wrote: > > Greg et al. > > > > I'm considering adding more error checking to the descriptor parsing > > routines in core/config.c. Especially I want to sort the interface > > pointers in order by bInterfaceNumber and sort the altsettings for each > > interface by bAlternateSetting -- since the device isn't necessarily going > > to transmit them in numerical order. > > Hm, that's a nice goal, but nothing I want to see happen before 2.6.0 > comes out. Is there a _real_ reason you want to sort the interfaces?
It's not a high priority for me either. But David Brownell mentioned that some devices transmit the descriptors out-of-order (he gave an example); we ought to be able to handle that. Checking the descriptors as they are parsed seems easier than making up accessor functions. Also, there's the general principle of not trusting unverified data, especially if doing so might cause a crash. > > The question is, what should the code do when it encounters these sorts > > of errors? > > Die a horrible death and blame the manufacturer for making a broken > device :) > > Seriously, if a device doesn't meet the spec, we don't have to work with > it. That being said, it might be nice if we do catch such problems that > we at least tell the user about them and then just abort adding the > device. Sounds good. ------------------------------------------------------- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf _______________________________________________ [EMAIL PROTECTED] To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel
