aboutsummaryrefslogtreecommitdiffstats
path: root/openbsc/src/bssap.c
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <zecke@selfish.org>2010-04-19 21:37:48 +0800
committerHolger Hans Peter Freyther <zecke@selfish.org>2010-04-19 22:15:32 +0800
commit1d34c6ac5af41c058ec76ee92c3045feed3fe9af (patch)
treec0200bafb97478166663d5aa9af7b7a074785a3f /openbsc/src/bssap.c
parent1506f8e46558b1f40aef942f67d2a6cbcda00b7b (diff)
bsc_msc_ip: Crash fix on MO-Call starting with a SDCCH
We do not assing a GSM Subscriber to Mobile Originated calls, when requesting a SDCCH and then starting call control we will crash here due trying to copy a NULL subscriber from the lchan to the other. We do not need to know the IMSI at the BSC so it is okay to not copy the subscriber around, we could even kill all subscriber handling in the future.
Diffstat (limited to 'openbsc/src/bssap.c')
-rw-r--r--openbsc/src/bssap.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/openbsc/src/bssap.c b/openbsc/src/bssap.c
index 1c84073da..73d225cec 100644
--- a/openbsc/src/bssap.c
+++ b/openbsc/src/bssap.c
@@ -289,7 +289,8 @@ static void bssmap_free_secondary(struct bss_sccp_connection_data *data)
lchan->msc_data = NULL;
/* give up the new channel to not do a SACCH deactivate */
- subscr_put(lchan->conn.subscr);
+ if (lchan->conn.subscr)
+ subscr_put(lchan->conn.subscr);
lchan->conn.subscr = NULL;
put_subscr_con(&lchan->conn, 1);
}
@@ -414,7 +415,8 @@ static int handle_new_assignment(struct msgb *msg, int full_rate, int chan_mode)
memcpy(&new_lchan->encr, &msg->lchan->encr, sizeof(new_lchan->encr));
new_lchan->ms_power = msg->lchan->ms_power;
new_lchan->bs_power = msg->lchan->bs_power;
- new_lchan->conn.subscr = subscr_get(msg->lchan->conn.subscr);
+ if (msg->lchan->conn.subscr)
+ new_lchan->conn.subscr = subscr_get(msg->lchan->conn.subscr);
/* copy new data to it */
use_subscr_con(&new_lchan->conn);