libsigrok/src
Vincent Palatin 2f004b4bc1 usb_get_port_path(): fix libusb error checking
When libusb cannot access a device, libusb_get_port_numbers() will return
an error. Check the return code rather than doing invalid pointer
operations (out-of-bound read).

Avoid segfaults at sigrok-cli startup on my setup where some USB devices are
not accessible and also make Valgrind happier.

Signed-off-by: Vincent Palatin <vpalatin@chromium.org>
2014-11-23 17:58:21 +01:00
..
dmm Add UNI-T UT71x DMM parser. 2014-10-25 16:53:32 +02:00
hardware saleae-logic16: Downgrade error during capture to a message. 2014-11-23 13:47:45 +01:00
input Eliminate sr_dev_inst_new(). 2014-11-21 02:01:36 +01:00
lcr Use g_malloc0() consistently, simplify error handling. 2014-11-22 17:02:57 +01:00
output Use g_malloc0() consistently, simplify error handling. 2014-11-22 17:02:57 +01:00
scpi Use g_malloc0() consistently, simplify error handling. 2014-11-22 17:02:57 +01:00
analog.c Add sr_rational_set() convenience function. 2014-11-23 17:48:29 +01:00
backend.c Use g_malloc0() consistently, simplify error handling. 2014-11-22 17:02:57 +01:00
device.c Use g_malloc0() consistently, simplify error handling. 2014-11-22 17:02:57 +01:00
drivers.c Brymen BM25x: Drop unneeded _ser/_SER suffix. 2014-11-02 16:40:40 +01:00
error.c error.c: Add missing entries. 2014-09-01 00:08:53 +02:00
ezusb.c Reorganize project tree. 2014-07-22 18:19:29 +02:00
hwdriver.c Add missing entries to sr_config_info_data[]. 2014-11-22 17:02:57 +01:00
libsigrok-internal.h Eliminate sr_dev_inst_new(). 2014-11-21 02:01:36 +01:00
log.c Reorganize project tree. 2014-07-22 18:19:29 +02:00
serial.c ols: Fix a serial port related issue on FreeBSD. 2014-11-01 19:44:36 +01:00
session.c Use g_malloc0() consistently, simplify error handling. 2014-11-22 17:02:57 +01:00
session_driver.c Publish config key capabilities on session driver. 2014-11-23 17:48:29 +01:00
session_file.c Don't check sr_channel_new() return value (always succeeds). 2014-11-21 12:10:05 +01:00
soft-trigger.c Reorganize project tree. 2014-07-22 18:19:29 +02:00
std.c Use g_malloc0() consistently, simplify error handling. 2014-11-22 17:02:57 +01:00
strutil.c Use g_malloc0() consistently, simplify error handling. 2014-11-22 17:02:57 +01:00
trigger.c trigger: Add some more error handling. 2014-11-22 21:03:39 +01:00
usb.c usb_get_port_path(): fix libusb error checking 2014-11-23 17:58:21 +01:00
version.c Reorganize project tree. 2014-07-22 18:19:29 +02:00