Change in libosmocore[master]: usb: Use OSMO_STRLCPY where appropriate

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.org
Mon Jan 6 17:15:15 UTC 2020


laforge has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmocore/+/16746 )


Change subject: usb: Use OSMO_STRLCPY where appropriate
......................................................................

usb: Use OSMO_STRLCPY where appropriate

Change-Id: I6b2a90fd8f4b042a1e38dbf8e99414a94a290375
---
M src/usb/osmo_libusb.c
1 file changed, 1 insertion(+), 1 deletion(-)



  git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/46/16746/1

diff --git a/src/usb/osmo_libusb.c b/src/usb/osmo_libusb.c
index 5b012b8..b10f5be 100644
--- a/src/usb/osmo_libusb.c
+++ b/src/usb/osmo_libusb.c
@@ -276,7 +276,7 @@
 				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;

-- 
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/16746
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: I6b2a90fd8f4b042a1e38dbf8e99414a94a290375
Gerrit-Change-Number: 16746
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/20200106/fb4d54f5/attachment.htm>


More information about the gerrit-log mailing list