[PATCH 5/7] ipa: fix segfault in ipa_client_conn_create if no E1 timeslot is specified

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/OpenBSC@lists.osmocom.org/.

pablo at gnumonks.org pablo at gnumonks.org
Fri Sep 9 00:36:59 UTC 2011


From: Pablo Neira Ayuso <pablo at gnumonks.org>

Fix segfault if IPA client is not used as signalling link (in that
case E1 timeslot is NULL).
---
 src/input/ipa.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/src/input/ipa.c b/src/input/ipa.c
index 774d578..4773dff 100644
--- a/src/input/ipa.c
+++ b/src/input/ipa.c
@@ -247,7 +247,8 @@ ipa_client_conn_create(void *ctx, struct e1inp_ts *ts,
 	/* default to generic write callback if not set. */
 	if (write_cb == NULL)
 		ipa_link->write_cb = ipa_client_write_default_cb;
-	ipa_link->line = ts->line;
+	if (ts)
+		ipa_link->line = ts->line;
 	ipa_link->data = data;
 	INIT_LLIST_HEAD(&ipa_link->tx_queue);
 
-- 
1.7.2.5





More information about the OpenBSC mailing list