Add ICU message format support
[chromium-blink-merge.git] / third_party / libusb / assign-endpoints-checks.patch
blob7ed09bdb2430a2e045699dccba3f1f0fbbae3131
1 diff --git a/third_party/libusb/src/libusb/os/windows_usb.c b/third_party/libusb/src/libusb/os/windows_usb.c
2 index 259897e..4469992 100644
3 --- a/third_party/libusb/src/libusb/os/windows_usb.c
4 +++ b/third_party/libusb/src/libusb/os/windows_usb.c
5 @@ -663,6 +663,12 @@ static int windows_assign_endpoints(struct libusb_device_handle *dev_handle, int
6 return r;
9 + if (iface >= conf_desc->bNumInterfaces ||
10 + altsetting >= conf_desc->interface[iface].num_altsetting) {
11 + usbi_dbg("interface %d, altsetting %d out of range", iface, altsetting);
12 + return LIBUSB_ERROR_INVALID_PARAM;
13 + }
15 if_desc = &conf_desc->interface[iface].altsetting[altsetting];
16 safe_free(priv->usb_interface[iface].endpoint);