[USBPORT] Correctly handle alternate settings returned from USBPORT_ParseConfiguratio...
authorThomas Faber <thomas.faber@reactos.org>
Wed, 6 Mar 2019 08:57:23 +0000 (09:57 +0100)
committerThomas Faber <thomas.faber@reactos.org>
Mon, 11 Mar 2019 07:53:55 +0000 (08:53 +0100)
commitac20ab031ca08a031b2dea321ba50ee4c86b18c4
tree3d8bc285ea30ca5e1bc1745f8612f5f725e8f06d
parent36c1cb09106eab6cebab2e6722c1907ca12bfa19
[USBPORT] Correctly handle alternate settings returned from USBPORT_ParseConfigurationDescriptor.

The last parameter of USBPORT_ParseConfigurationDescriptor is a pointer
to a boolean indicating whether any alternate interface settings were
found for the specified interface.
Interpreting it as an alternate setting value, as we did before,
would always override the alternate setting to '1' (if any alternate
descriptors were present), therefore selecting the wrong interface
setting, and possibly causing a buffer overflow on the InterfaceList's
Pipes array.

Found by Special Pool.
drivers/usb/usbport/device.c