laforge has uploaded this change for review. (
https://gerrit.osmocom.org/c/osmo-e1d/+/27583 )
Change subject: intf_line.c: Make e1d_find_intf_by_usb_serial safe for empty string
......................................................................
intf_line.c: Make e1d_find_intf_by_usb_serial safe for empty string
Avoid segfault in case the empty string is passed as serial_str.
Change-Id: Ia69912cb714441415d8decd68890d1b97b77132d
---
M src/intf_line.c
1 file changed, 3 insertions(+), 0 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-e1d refs/changes/83/27583/1
diff --git a/src/intf_line.c b/src/intf_line.c
index 0ff3942..c9011a8 100644
--- a/src/intf_line.c
+++ b/src/intf_line.c
@@ -100,6 +100,9 @@
{
struct e1_intf *intf;
+ if (!serial_str)
+ return NULL;
+
llist_for_each_entry(intf, &e1d->interfaces, list)
if (intf->usb.serial_str && !strcmp(intf->usb.serial_str, serial_str))
return intf;
--
To view, visit
https://gerrit.osmocom.org/c/osmo-e1d/+/27583
To unsubscribe, or for help writing mail filters, visit
https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-e1d
Gerrit-Branch: master
Gerrit-Change-Id: Ia69912cb714441415d8decd68890d1b97b77132d
Gerrit-Change-Number: 27583
Gerrit-PatchSet: 1
Gerrit-Owner: laforge <laforge(a)osmocom.org>
Gerrit-MessageType: newchange