aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHarald Welte <laforge@osmocom.org>2019-12-24 12:07:47 +0100
committerHarald Welte <laforge@osmocom.org>2020-01-06 18:12:14 +0100
commit424eac8b6aa15887c4c723504404a2079bc8c026 (patch)
treee38cbcc0a8b156a070d117860a4842e0da1c6167
parent57d1118c25ea08dbc84492dfbe8ab15fc7333b4d (diff)
usb: Use OSMO_STRLCPY where appropriate
-rw-r--r--src/usb/osmo_libusb.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/usb/osmo_libusb.c b/src/usb/osmo_libusb.c
index 5b012b86..b10f5beb 100644
--- a/src/usb/osmo_libusb.c
+++ b/src/usb/osmo_libusb.c
@@ -276,7 +276,7 @@ int osmo_libusb_dev_find_matching_interfaces(libusb_device *dev, int class, int
out[out_idx].vendor = dev_desc.idVendor;
out[out_idx].product = dev_desc.idProduct;
out[out_idx].addr = addr;
- strncpy(out[out_idx].path, path, sizeof(out[out_idx].path)-1);
+ OSMO_STRLCPY_ARRAY(out[out_idx].path, path);
out[out_idx].path[sizeof(out[out_idx].path)-1] = '\0';
out[out_idx].configuration = conf_desc->bConfigurationValue;
out[out_idx].interface = if_desc->bInterfaceNumber;