From 3fbd2441879cf72a8d08130455c498e29afbfe9c Mon Sep 17 00:00:00 2001 From: Holger Hans Peter Freyther Date: Sun, 16 Jan 2011 18:18:56 +0100 Subject: bsc: Initialize the subscr to NULL in the default case The paging response should always have a TMSI or IMSI and we should be able to find the subscriber using that. If no IMSI/TMSI is present and we would still accept the LU we would access the uninitialized memory. --- openbsc/src/bsc/osmo_bsc_filter.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'openbsc') diff --git a/openbsc/src/bsc/osmo_bsc_filter.c b/openbsc/src/bsc/osmo_bsc_filter.c index e222ac955..d2735a63a 100644 --- a/openbsc/src/bsc/osmo_bsc_filter.c +++ b/openbsc/src/bsc/osmo_bsc_filter.c @@ -83,6 +83,9 @@ static int handle_page_resp(struct gsm_subscriber_connection *conn, struct msgb case GSM_MI_TYPE_IMSI: subscr = subscr_active_by_imsi(conn->bts->network, mi_string); break; + default: + subscr = NULL; + break; } if (!subscr) { -- cgit v1.2.3