mirror of
https://github.com/izzy2lost/dolphin.git
synced 2026-06-19 01:16:48 -07:00
Externals/libusb: Bounds check the interface number
This commit is contained in:
+3
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user