mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-06-28 01:49:33 -06:00
Externals/libusb: Bounds check the interface number
This commit is contained in:
3
Externals/libusb/libusb/os/windows_winusb.c
vendored
3
Externals/libusb/libusb/os/windows_winusb.c
vendored
@ -2412,6 +2412,9 @@ static int get_valid_interface(struct libusb_device_handle *dev_handle, int api_
|
|||||||
*/
|
*/
|
||||||
static int check_valid_interface(struct libusb_device_handle *dev_handle, unsigned short interface, int api_id)
|
static int check_valid_interface(struct libusb_device_handle *dev_handle, unsigned short interface, int api_id)
|
||||||
{
|
{
|
||||||
|
if (interface >= USB_MAXINTERFACES)
|
||||||
|
return -1;
|
||||||
|
|
||||||
struct winusb_device_handle_priv *handle_priv = _device_handle_priv(dev_handle);
|
struct winusb_device_handle_priv *handle_priv = _device_handle_priv(dev_handle);
|
||||||
struct winusb_device_priv *priv = _device_priv(dev_handle->dev);
|
struct winusb_device_priv *priv = _device_priv(dev_handle->dev);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user