mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-01-09 07:39:26 +01:00
Externals/libusb: Bounds check the interface number
This commit is contained in:
parent
99b340a6d0
commit
20770fe22b
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)
|
||||
{
|
||||
if (interface >= USB_MAXINTERFACES)
|
||||
return -1;
|
||||
|
||||
struct winusb_device_handle_priv *handle_priv = _device_handle_priv(dev_handle);
|
||||
struct winusb_device_priv *priv = _device_priv(dev_handle->dev);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user