Skip to content

Commit a4fdee0

Browse files
committed
1 parent 8bef41c commit a4fdee0

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

gusb/gusb-device.c

+8
Original file line numberDiff line numberDiff line change
@@ -1319,6 +1319,14 @@ g_usb_device_get_bos_descriptors(GUsbDevice *self, GError **error)
13191319
g_usb_device_not_open_error(self, error);
13201320
return NULL;
13211321
}
1322+
if (g_usb_device_get_spec(self) <= 0x0200) {
1323+
g_set_error(error,
1324+
G_IO_ERROR,
1325+
G_IO_ERROR_NOT_SUPPORTED,
1326+
"not available as bcdUSB 0x%04x <= 0x0200",
1327+
g_usb_device_get_spec(self));
1328+
return NULL;
1329+
}
13221330

13231331
rc = libusb_get_bos_descriptor(priv->handle, &bos);
13241332
if (!g_usb_device_libusb_error_to_gerror(self, rc, error))

0 commit comments

Comments
 (0)