[PATCH] USB: usb_get_descriptor, more error checks
I've had different versions of this floating around for a while; basically, the goal is to be more robust against devices that misbehave by returning garbage descriptors in certain cases. Add an extra check when fetching descriptors: the type must be correct. This guards against different types of firmware (or maybe hardware) errors than the two checks already being made. Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
Showing
Please register or sign in to comment