Skip to content
Permalink
Browse files

Externals/libusb: Bounds check the interface number

  • Loading branch information...
leoetlino committed May 1, 2019
1 parent 99b340a commit 20770fe22bb5c7a1abe5d1a2a35b4f811e1e1b78
Showing with 3 additions and 0 deletions.
  1. +3 −0 Externals/libusb/libusb/os/windows_winusb.c
@@ -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);

0 comments on commit 20770fe

Please sign in to comment.
You can’t perform that action at this time.