Skip to content

Commit

Permalink
Externals/libusb: Bounds check the interface number
Browse files Browse the repository at this point in the history
  • Loading branch information
leoetlino committed May 27, 2019
1 parent 99b340a commit 20770fe
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions Externals/libusb/libusb/os/windows_winusb.c
Expand Up @@ -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);

Expand Down

0 comments on commit 20770fe

Please sign in to comment.