laforge has submitted this change. ( 
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(-)

Approvals:
  Jenkins Builder: Verified
  laforge: Looks good to me, approved
  tnt: Looks good to me, but someone else must approve



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;



1 is the latest approved patch-set.
No files were changed between the latest approved patch-set and the submitted 
one.
--
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: 2
Gerrit-Owner: laforge <lafo...@osmocom.org>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <lafo...@osmocom.org>
Gerrit-Reviewer: tnt <t...@246tnt.com>
Gerrit-MessageType: merged

Reply via email to