This is merely a historical archive of years 2008-2021, before the migration to mailman3.
A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.
laforge gerrit-no-reply at lists.osmocom.orglaforge has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmocore/+/16927 )
Change subject: osmo_libusb: Check return of libusb_get_string_descriptor_ascii()
......................................................................
osmo_libusb: Check return of libusb_get_string_descriptor_ascii()
Change-Id: Ifc0133737627a8277635f8f3662b3f6e922be149
Closes: CID#207713
---
M src/usb/osmo_libusb.c
1 file changed, 6 insertions(+), 0 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/27/16927/1
diff --git a/src/usb/osmo_libusb.c b/src/usb/osmo_libusb.c
index 9ad6240..7a13a7e 100644
--- a/src/usb/osmo_libusb.c
+++ b/src/usb/osmo_libusb.c
@@ -334,6 +334,12 @@
}
rc = libusb_get_string_descriptor_ascii(devh, dev_desc.iSerialNumber,
(uint8_t *) strbuf, sizeof(strbuf));
+ if (rc < 0) {
+ LOGP(DLUSB, LOGL_ERROR, "Cannot read USB Descriptor: %s\n",
+ libusb_strerror(rc));
+ libusb_close(devh);
+ continue;
+ }
libusb_close(devh);
if (strcmp(strbuf, serial))
continue;
--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/16927
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: Ifc0133737627a8277635f8f3662b3f6e922be149
Gerrit-Change-Number: 16927
Gerrit-PatchSet: 1
Gerrit-Owner: laforge <laforge at osmocom.org>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20200118/5120e223/attachment.htm>