Commit graph

17 commits

Author SHA1 Message Date
Victor Perevertkin 34593d933b
[FORMATTING][NTOS][HAL][DRIVERS][SDK] Fix trailing spaces 2021-06-11 15:33:08 +03:00
Thomas Faber 026a12fe39
[USBPORT] Implement interface setting in USBPORT_OpenInterface. 2019-03-11 08:54:01 +01:00
Thomas Faber ac20ab031c
[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.
2019-03-11 08:53:55 +01:00
Thomas Faber 36c1cb0910
[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.
2019-03-11 08:53:53 +01:00
Timo Kreuzer c1944118ca [USBPORT] Fix 64 bit issues 2018-08-04 19:19:34 +02:00
Vadim Galyant 11772da783 [USBPORT] Small changes for debugging. 2018-01-26 20:46:34 +09:00
Vadim Galyant 67138e7d54 [USBPORT] Use ExFreePoolWithTag() instead ExFreePool() for TtExtension. Add debug info. 2018-01-21 19:35:47 +01:00
Vadim Galyant 02d1cfd37f [USBPORT] Change debug message in USBPORT_RemoveDevice((). 2018-01-21 19:35:41 +01:00
Vadim Galyant 5e15ba48b9 [USBPORT] Add support for transaction translators in USBPORT_RemoveDevice(). 2018-01-21 19:35:41 +01:00
Vadim Galyant cbba6e80fc [USBPORT] Correcting USBPORT_InitializeDevice() and USBPORT_RestoreDevice() (DEVICE_HANDLE_FLAG_USB2HUB). 2018-01-21 19:35:41 +01:00
Vadim Galyant c6ca2a8f02 [USBPORT] Add support for transaction translators in USBPORT_OpenPipe() and USBPORT_ClosePipe(). 2018-01-21 19:35:40 +01:00
Vadim Galyant 0f8425ed44 [USBPORT] Add USBPORT_GetTt(). 2018-01-21 19:35:39 +01:00
Vadim Galyant c92f591144 [USBPORT] Add support for transaction translators in USBPORT_CreateDevice(). 2018-01-21 19:35:39 +01:00
Vadim Galyant 18702047a1 [USBPORT] Implement USBPORT_InitializeTT(). 2018-01-21 19:35:38 +01:00
Vadim Galyant 73bfc3c897
[USBPORT] Type-safe function signature (PVOID -> PUSBPORT_xxx). 2017-11-23 16:34:24 +01:00
Thomas Faber bf74391dcd [USBPORT] Avoid more integer overflows. 2017-10-13 23:36:29 +02:00
Colin Finck c2c66aff7d Git conversion: Make reactos the root directory, move rosapps, rostests, wallpapers into modules, and delete rossubsys. 2017-10-03 07:45:34 +00:00
Renamed from reactos/drivers/usb/usbport/device.c (Browse further)