From f121350fc971c335588173c554ccca2b5fa74be4 Mon Sep 17 00:00:00 2001 From: Vegard Storheil Eriksen Date: Tue, 27 Apr 2021 11:39:43 +0200 Subject: [PATCH] hosted/cmsis_dap: Verify that a v2 interface has endpoints. --- src/platforms/hosted/bmp_libusb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/platforms/hosted/bmp_libusb.c b/src/platforms/hosted/bmp_libusb.c index 8c63d240..743f25b1 100644 --- a/src/platforms/hosted/bmp_libusb.c +++ b/src/platforms/hosted/bmp_libusb.c @@ -94,7 +94,7 @@ static bmp_type_t find_cmsis_dap_interface(libusb_device *dev,bmp_info_t *info) if (interface->bInterfaceClass == 0x03) { type = BMP_TYPE_CMSIS_DAP_V1; - } else if (interface->bInterfaceClass == 0xff) { + } else if (interface->bInterfaceClass == 0xff && interface->bNumEndpoints == 2) { type = BMP_TYPE_CMSIS_DAP_V2; info->interface_num = interface->bInterfaceNumber;