[USBPORT] Correctly find interface descriptor in USBPORT_ParseConfigurationDescriptor
authorThomas Faber <thomas.faber@reactos.org>
Wed, 6 Mar 2019 08:22:55 +0000 (09:22 +0100)
committerThomas Faber <thomas.faber@reactos.org>
Mon, 11 Mar 2019 07:53:53 +0000 (08:53 +0100)
commit36c1cb09106eab6cebab2e6722c1907ca12bfa19
tree797be62e747cfa194ebea159e20c1cda6619f9dd
parent1946f6bb251aba0e10943989e23cf2d151977d3f
[USBPORT] Correctly find interface descriptor in USBPORT_ParseConfigurationDescriptor

There can be other descriptors between the config descriptor and the
first interface descriptor, so we specifically need to check for
the interface descriptor type and skip anything before that.
We also need to guard against bLength == 0, which would cause an
infinite loop, instead of doing a second bDescriptorType check.
drivers/usb/usbport/device.c