FreeBSD Bugzilla – Attachment 204897 Details for
Bug 238412
libusb_get_config_descriptor() should return LIBUSB_NOT_FOUND on out-of-range config_index
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
proposed patch
libusb-fix-get-config-descriptor.patch (text/plain), 443 bytes, created by
takahiro.kurosawa
on 2019-06-08 04:23:14 UTC
(
hide
)
Description:
proposed patch
Filename:
MIME Type:
Creator:
takahiro.kurosawa
Created:
2019-06-08 04:23:14 UTC
Size:
443 bytes
patch
obsolete
>diff --git a/lib/libusb/libusb20.c b/lib/libusb/libusb20.c >index e02aa295baa..f0835e7b705 100644 >--- a/lib/libusb/libusb20.c >+++ b/lib/libusb/libusb20.c >@@ -953,6 +953,9 @@ libusb20_dev_alloc_config(struct libusb20_device *pdev, uint8_t configIndex) > uint8_t do_close; > int error; > >+ if (configIndex >= pdev->ddesc.bNumConfigurations) { >+ return (NULL); >+ } > if (!pdev->is_opened) { > error = libusb20_dev_open(pdev, 0); > if (error) {
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 238412
: 204897